Page MenuHomePhabricator

gamesh411 (Endre Fülöp)
User

Projects

User does not belong to any projects.

User Details

User Since
Dec 19 2016, 5:58 AM (336 w, 2 d)

Recent Activity

Thu, May 18

gamesh411 accepted D149447: [clang][analyzer] Improve documentation of StdCLibraryFunctionArgs checker (NFC).
Thu, May 18, 1:22 AM · Restricted Project, Restricted Project

Tue, May 16

gamesh411 added a comment to D150647: [WIP][analyzer] Fix EnumCastOutOfRangeChecker C++17 handling.

In C++17 the initialization rules for enum classes are relaxed.

In what way are they relaxed compared to regular enums?

The initialization rules are relaxed compared to their pre-C++17 state, so now there is a possibility of an initialization for enum classes without explicitly mentioning the underlying type.
I have updated the revision body.

Tue, May 16, 10:46 AM · Restricted Project, Restricted Project
gamesh411 updated the summary of D150647: [WIP][analyzer] Fix EnumCastOutOfRangeChecker C++17 handling.
Tue, May 16, 10:10 AM · Restricted Project, Restricted Project
gamesh411 added a comment to D150647: [WIP][analyzer] Fix EnumCastOutOfRangeChecker C++17 handling.

Just the test cases are added so far.

Tue, May 16, 1:35 AM · Restricted Project, Restricted Project
gamesh411 requested review of D150647: [WIP][analyzer] Fix EnumCastOutOfRangeChecker C++17 handling.
Tue, May 16, 1:31 AM · Restricted Project, Restricted Project

Feb 23 2023

gamesh411 accepted D140562: [clang][ASTImporter] Improve import of InjectedClassNameType..
Feb 23 2023, 5:04 AM · Restricted Project, Restricted Project

Jan 19 2023

gamesh411 added a reviewer for D138777: [clang-tidy] Add check bugprone-multiple-new-in-one-expression.: donat.nagy.
Jan 19 2023, 12:40 AM · Restricted Project, Restricted Project
gamesh411 added a reviewer for D140562: [clang][ASTImporter] Improve import of InjectedClassNameType.: donat.nagy.
Jan 19 2023, 12:37 AM · Restricted Project, Restricted Project

Dec 19 2022

gamesh411 accepted D136848: [clang][AST] Compare UnresolvedLookupExpr in structural equivalence..

I have verified this patch on open-source projects. Bitcoin had quite a few crashes without this; those are gone. LGTM

Dec 19 2022, 11:45 PM · Restricted Project, Restricted Project

May 31 2022

gamesh411 added a comment to D126186: [clang-tidy] Extend cert-oop57-cpp to check non-zero memset values.

Thanks for the quick review!
Fixed the double backtick in the release notes as well.

May 31 2022, 11:25 PM · Restricted Project, Restricted Project
gamesh411 committed rGe290fcef111c: [clang-tidy] Extend cert-oop57-cpp to check non-zero memset values (authored by gamesh411).
[clang-tidy] Extend cert-oop57-cpp to check non-zero memset values
May 31 2022, 11:24 PM · Restricted Project, Restricted Project
gamesh411 added a reverting change for rGd33f199910fa: [clang-tidy] Extend cert-oop57-cpp to check non-zero memset values: rG1c459a20ea56: Revert "[clang-tidy] Extend cert-oop57-cpp to check non-zero memset values".
May 31 2022, 11:24 PM · Restricted Project, Restricted Project
gamesh411 committed rG1c459a20ea56: Revert "[clang-tidy] Extend cert-oop57-cpp to check non-zero memset values" (authored by gamesh411).
Revert "[clang-tidy] Extend cert-oop57-cpp to check non-zero memset values"
May 31 2022, 11:24 PM · Restricted Project, Restricted Project
gamesh411 added a reverting change for D126186: [clang-tidy] Extend cert-oop57-cpp to check non-zero memset values: rG1c459a20ea56: Revert "[clang-tidy] Extend cert-oop57-cpp to check non-zero memset values".
May 31 2022, 11:24 PM · Restricted Project, Restricted Project
gamesh411 committed rGd33f199910fa: [clang-tidy] Extend cert-oop57-cpp to check non-zero memset values (authored by gamesh411).
[clang-tidy] Extend cert-oop57-cpp to check non-zero memset values
May 31 2022, 11:17 PM · Restricted Project, Restricted Project
gamesh411 closed D126186: [clang-tidy] Extend cert-oop57-cpp to check non-zero memset values.
May 31 2022, 11:16 PM · Restricted Project, Restricted Project

May 30 2022

gamesh411 updated the diff for D126186: [clang-tidy] Extend cert-oop57-cpp to check non-zero memset values.

Remove literal checking from the matcher for memset as well

May 30 2022, 1:37 AM · Restricted Project, Restricted Project
gamesh411 updated the diff for D126186: [clang-tidy] Extend cert-oop57-cpp to check non-zero memset values.

fix Release Notes

May 30 2022, 1:23 AM · Restricted Project, Restricted Project

May 23 2022

gamesh411 updated the diff for D126186: [clang-tidy] Extend cert-oop57-cpp to check non-zero memset values.

Add full diff with arcanist

May 23 2022, 5:52 AM · Restricted Project, Restricted Project
gamesh411 updated the diff for D126186: [clang-tidy] Extend cert-oop57-cpp to check non-zero memset values.

Added a release note
Also generated the full context (arcanist could validate the site certificate, that's why I had to resort to manual diff creation. Was there a certificate change on the reviews.llmv.org site maybe?)

May 23 2022, 3:44 AM · Restricted Project, Restricted Project
gamesh411 added a comment to D126186: [clang-tidy] Extend cert-oop57-cpp to check non-zero memset values.

{F23163926}
There is no change in the results as far as these OS projects are concerned.

May 23 2022, 3:09 AM · Restricted Project, Restricted Project
gamesh411 requested review of D126186: [clang-tidy] Extend cert-oop57-cpp to check non-zero memset values.
May 23 2022, 1:22 AM · Restricted Project, Restricted Project

May 13 2022

gamesh411 updated the diff for D125524: [BoundV2] ArrayBoundV2 checks if the extent is tainted.

add analyzer tag

May 13 2022, 1:10 AM · Restricted Project, Restricted Project
gamesh411 requested review of D125524: [BoundV2] ArrayBoundV2 checks if the extent is tainted.
May 13 2022, 1:03 AM · Restricted Project, Restricted Project
gamesh411 committed rG094fb13b88b3: [analyzer] Add taint to the BoolAssignmentChecker (authored by gamesh411).
[analyzer] Add taint to the BoolAssignmentChecker
May 13 2022, 12:29 AM · Restricted Project, Restricted Project
gamesh411 closed D125360: [analyzer] Add taint to the BoolAssignmentChecker.
May 13 2022, 12:29 AM · Restricted Project, Restricted Project

May 11 2022

gamesh411 requested review of D125365: [NFC][analyzer] Pass down a State and a Pred ExplodedNode in the MallocChecker.
May 11 2022, 2:32 AM · Restricted Project, Restricted Project
gamesh411 requested review of D125362: [NFC][analyzer] Transitive interestingness in BugReporter.
May 11 2022, 2:24 AM · Restricted Project, Restricted Project
gamesh411 requested review of D125360: [analyzer] Add taint to the BoolAssignmentChecker.
May 11 2022, 1:54 AM · Restricted Project, Restricted Project

May 9 2022

gamesh411 added a comment to D125225: [WIP][analyzer] Taint Notes enhancements.

@steakhal
This is WIP as there is still a stdlib function, that does not pass the test, and I would like to add more complex taint propagation test cases as well.
Could you please glance over these commits:
[Malloc] Pass down a State and a Pred ExplodedNode in the MallocChecker
[BoundV2][Malloc] Place NoteTags when allocated an interesting tainted amount of memory
[Stdlib] Add taint to the StdLibraryFunctionsChecker

May 9 2022, 6:58 AM · Restricted Project, Restricted Project
gamesh411 updated the diff for D125225: [WIP][analyzer] Taint Notes enhancements.
  • [BoolAssign] Add taint to the BoolAssignmentChecker
  • [BugReporter] Transitive interestingness
  • [Malloc] Pass down a State and a Pred ExplodedNode in the MallocChecker
  • [BoundV2] ArrayBoundV2 checks if the extent is tainted
  • [BoundV2][Malloc] Place NoteTags when allocated an interesting tainted amount of memory
  • [CString] Add ConsiderTaint checker option for CStringChecker
  • [CString] Consider tainted out-of-bound accesses
  • [Stdlib] Add taint to the StdLibraryFunctionsChecker
  • [Malloc] Implement the rsize_t like heuristic
May 9 2022, 6:50 AM · Restricted Project, Restricted Project
gamesh411 requested review of D125225: [WIP][analyzer] Taint Notes enhancements.
May 9 2022, 6:00 AM · Restricted Project, Restricted Project

Mar 7 2022

gamesh411 committed rGbfc40b1a1a2c: [analyzer] Fix buildbot failure for D120369 (authored by gamesh411).
[analyzer] Fix buildbot failure for D120369
Mar 7 2022, 5:58 AM · Restricted Project
gamesh411 committed rG4fd6c6e65ab5: [analyzer] Add more propagations to Taint analysis (authored by gamesh411).
[analyzer] Add more propagations to Taint analysis
Mar 7 2022, 4:19 AM · Restricted Project
gamesh411 closed D120369: [analyzer] Add more propagations to Taint analysis.
Mar 7 2022, 4:19 AM · Restricted Project, Restricted Project
gamesh411 updated the diff for D120369: [analyzer] Add more propagations to Taint analysis.

rebase

Mar 7 2022, 2:10 AM · Restricted Project, Restricted Project

Mar 1 2022

gamesh411 added inline comments to D120369: [analyzer] Add more propagations to Taint analysis.
Mar 1 2022, 4:58 AM · Restricted Project, Restricted Project
gamesh411 updated the diff for D120369: [analyzer] Add more propagations to Taint analysis.
  • remove vscanf and co.
  • use debug.ExprInspection for test cases
  • fix semantic issues for modeled functions
Mar 1 2022, 4:58 AM · Restricted Project, Restricted Project

Feb 28 2022

gamesh411 committed rG34a7387986a6: [analyzer] Add more sources to Taint analysis (authored by gamesh411).
[analyzer] Add more sources to Taint analysis
Feb 28 2022, 2:33 AM
gamesh411 closed D120236: [analyzer] Add more sources to Taint analysis.
Feb 28 2022, 2:33 AM · Restricted Project
gamesh411 updated the diff for D120236: [analyzer] Add more sources to Taint analysis.

fix readlinkat arg index
extend testcase for readlinkat

Feb 28 2022, 2:14 AM · Restricted Project
gamesh411 added a comment to D120236: [analyzer] Add more sources to Taint analysis.

readlinkat fix incoming

Feb 28 2022, 2:06 AM · Restricted Project
gamesh411 updated the diff for D120236: [analyzer] Add more sources to Taint analysis.

add readlinkat
rename _IO_getc testcase

Feb 28 2022, 2:04 AM · Restricted Project

Feb 23 2022

gamesh411 added inline comments to D120236: [analyzer] Add more sources to Taint analysis.
Feb 23 2022, 1:57 AM · Restricted Project
gamesh411 updated the diff for D120236: [analyzer] Add more sources to Taint analysis.
  • s/getcw/getwd
  • add gets_s
  • remove getopt variants
  • add realinkat
  • discuss getnameinfo?
  • rename tests
  • update getnameinfo
  • comment on source/propagator discrepancy
  • update tests where 1 / tainted, and tainted cannot be 0
  • renamed tests
Feb 23 2022, 1:56 AM · Restricted Project

Feb 22 2022

gamesh411 requested review of D120369: [analyzer] Add more propagations to Taint analysis.
Feb 22 2022, 4:34 PM · Restricted Project, Restricted Project

Feb 21 2022

gamesh411 requested review of D120236: [analyzer] Add more sources to Taint analysis.
Feb 21 2022, 1:36 AM · Restricted Project

Feb 8 2022

gamesh411 accepted D119129: [analyzer] Fix taint rule of fgets and setproctitle_init.
Feb 8 2022, 1:37 AM · Restricted Project

Jan 18 2022

gamesh411 committed rG17f74240e6c3: [analyzer][NFC] Refactor GenericTaintChecker to use CallDescriptionMap (authored by gamesh411).
[analyzer][NFC] Refactor GenericTaintChecker to use CallDescriptionMap
Jan 18 2022, 7:04 AM
gamesh411 closed D116025: [analyzer][NFC] Refactor GenericTaintChecker to use CallDescriptionMap.
Jan 18 2022, 7:04 AM · Restricted Project
gamesh411 updated the diff for D116025: [analyzer][NFC] Refactor GenericTaintChecker to use CallDescriptionMap.

Remove explicit template keyword for MSVC compatibility

Jan 18 2022, 3:16 AM · Restricted Project

Jan 17 2022

gamesh411 updated the diff for D116025: [analyzer][NFC] Refactor GenericTaintChecker to use CallDescriptionMap.

All (except the last) commits were excluded in the previous patch upload

Jan 17 2022, 5:16 AM · Restricted Project
gamesh411 abandoned D114706: [analyzer] Fix sensitive argument logic in GenericTaintChecker.

This is superseded by D116025.

Jan 17 2022, 1:13 AM · Restricted Project
gamesh411 added a comment to D116025: [analyzer][NFC] Refactor GenericTaintChecker to use CallDescriptionMap.

Applied typo and naming fixes, introduced 2 move operations, and re-introduced short circuiting.

Jan 17 2022, 1:09 AM · Restricted Project
gamesh411 updated the diff for D116025: [analyzer][NFC] Refactor GenericTaintChecker to use CallDescriptionMap.

Fixes round two

Jan 17 2022, 1:07 AM · Restricted Project

Jan 12 2022

gamesh411 updated the diff for D116025: [analyzer][NFC] Refactor GenericTaintChecker to use CallDescriptionMap.

Tidy things up thanks to the recommendations of @steakhal

Jan 12 2022, 1:19 AM · Restricted Project

Dec 20 2021

gamesh411 committed rGc6a861e644a9: [analyzer] Add range constructor to CallDescriptionMap (authored by gamesh411).
[analyzer] Add range constructor to CallDescriptionMap
Dec 20 2021, 3:17 AM
gamesh411 closed D115934: [analyzer] Add range constructor to CallDescriptionMap.
Dec 20 2021, 3:16 AM · Restricted Project
gamesh411 committed rGe0321eb86158: [analyzer] Enable move semantics for CallDescriptionMap (authored by gamesh411).
[analyzer] Enable move semantics for CallDescriptionMap
Dec 20 2021, 3:16 AM
gamesh411 closed D115931: [analyzer] Enable move semantics for CallDescriptionMap.
Dec 20 2021, 3:16 AM · Restricted Project
gamesh411 requested review of D116025: [analyzer][NFC] Refactor GenericTaintChecker to use CallDescriptionMap.
Dec 20 2021, 2:59 AM · Restricted Project
gamesh411 updated the diff for D115931: [analyzer] Enable move semantics for CallDescriptionMap.

Remove static asserts as it adds little to no value in this case

Dec 20 2021, 2:18 AM · Restricted Project
gamesh411 updated the diff for D115934: [analyzer] Add range constructor to CallDescriptionMap.

Remove static asserts as it only makes the tests more brittle

Dec 20 2021, 2:15 AM · Restricted Project

Dec 17 2021

gamesh411 requested review of D115934: [analyzer] Add range constructor to CallDescriptionMap.
Dec 17 2021, 5:12 AM · Restricted Project
gamesh411 requested review of D115931: [analyzer] Enable move semantics for CallDescriptionMap.
Dec 17 2021, 4:43 AM · Restricted Project

Nov 29 2021

gamesh411 requested review of D114706: [analyzer] Fix sensitive argument logic in GenericTaintChecker.
Nov 29 2021, 6:18 AM · Restricted Project

Nov 28 2021

gamesh411 committed rG4aac00a71db3: [analyzer][doc] Add user documenation for taint analysis (authored by gamesh411).
[analyzer][doc] Add user documenation for taint analysis
Nov 28 2021, 7:56 PM
gamesh411 closed D113251: [analyzer][doc] Add user documenation for taint analysis.
Nov 28 2021, 7:56 PM · Restricted Project

Nov 25 2021

gamesh411 updated the diff for D113251: [analyzer][doc] Add user documenation for taint analysis.

update with arc diff $(git merge-base HEAD upstream) --update D113251
in order to satisfy workflow pre-merge checks

Nov 25 2021, 1:03 AM · Restricted Project

Nov 23 2021

gamesh411 updated the diff for D113251: [analyzer][doc] Add user documenation for taint analysis.

fix indentation warning
make inline code formatting look better

Nov 23 2021, 2:41 AM · Restricted Project
gamesh411 added inline comments to D113251: [analyzer][doc] Add user documenation for taint analysis.
Nov 23 2021, 1:28 AM · Restricted Project
gamesh411 updated the diff for D113251: [analyzer][doc] Add user documenation for taint analysis.

tidy up based on comments from whispy

Nov 23 2021, 1:28 AM · Restricted Project

Nov 18 2021

gamesh411 updated the diff for D113251: [analyzer][doc] Add user documenation for taint analysis.

Fix the review comments of @steakhal

Nov 18 2021, 1:55 AM · Restricted Project
gamesh411 added inline comments to D113251: [analyzer][doc] Add user documenation for taint analysis.
Nov 18 2021, 1:48 AM · Restricted Project

Nov 5 2021

gamesh411 requested review of D113251: [analyzer][doc] Add user documenation for taint analysis.
Nov 5 2021, 2:44 AM · Restricted Project

Nov 28 2020

gamesh411 added a comment to D92103: [ASTImporter] Import the default argument of TemplateTypeParmDecl.

On bitcoin v0.18.1, there is an assertion introduced by this change.
The TU that can be used for reproduction is src/script/interpreter.cpp.
Assertion message:

CTU loaded AST file: /home/gamesh411/bitcoin/src/script/script.cpp                                                                                                                                         
clang: /home/gamesh411/llvm-project/clang/lib/AST/ASTContext.cpp:4411: clang::QualType clang::ASTContext::getInjectedClassNameType(clang::CXXRecordDecl*, clang::QualType) const: Assertion `NeedsInjectedC
lassNameType(Decl)' failed.
Nov 28 2020, 12:15 PM · Restricted Project, Restricted Project

Nov 25 2020

gamesh411 committed rGdc96cc33c13e: [clang][test] Fix prefix operator++ signature in iterators (authored by gamesh411).
[clang][test] Fix prefix operator++ signature in iterators
Nov 25 2020, 9:07 AM
gamesh411 closed D89528: [clang][test] Fix prefix operator++ signature in iterators.
Nov 25 2020, 9:07 AM · Restricted Project
gamesh411 abandoned D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C.
In D83717#2370154, @NoQ wrote:

I don't think you actually need active support for invoking exit handlers path-sensitively at the end of main() in order to implement your checker. You can still find out in a path-insensitive manner whether any given function acts as an exit handler, like you already do. Then during path-sensitive analysis of that function you can warn at any invocation of exit().

I do believe that you want to implement this check as a path-sensitive check as long as you want any sort of interprocedural analysis (i.e., warn when an exit handler calls a function that calls a function ... that calls a function that calls exit() - and you do already have such tests). This is because of the following potential situation:

void foo(bool already_exiting) {
  if (!already_exiting)
    exit();
}

void bar() {
  foo(true);
}

void baz() {
  foo(false);
}

int main() {
  atexit(bar);
  return 0;
}

In this case bar() is an exit handler that calls foo() that calls exit(). However the code is correct and no warning should be emitted, because foo() would never call exit() when called from bar() specifically. Precise reasoning about such problems requires path-sensitive analysis. Of course it's up to you to decide what to do with these false positives - whether you'll be ok with having them, or choose to suppress with an imprecise heuristic - but that's one of the possible reasons to consider reimplementing the checker via path sensitive analysis that the static analyzer provides.

We've had a similar problem with the checker that warns on calling pure virtual functions in constructors/destructors (which is undefined behavior). Such checker had to be path sensitive in order to be interprocedural for the exact same unobvious reason. We've decided to re-implement it with path-sensitive analysis and now we're pretty happy about that decision.

Nov 25 2020, 1:01 AM · Restricted Project, Restricted Project, Restricted Project
gamesh411 abandoned D87830: [clang-tidy][test] Allow empty checks in check_clang_tidy.py.
Nov 25 2020, 12:44 AM · Restricted Project

Nov 23 2020

gamesh411 retitled D91948: [WIP][analyzer][doc] Add Container- and IteratorModeling developer docs from [analyzer][doc] Add Container- and IteratorModeling developer docs to [WIP][analyzer][doc] Add Container- and IteratorModeling developer docs.
Nov 23 2020, 1:48 AM · Restricted Project
gamesh411 requested review of D91948: [WIP][analyzer][doc] Add Container- and IteratorModeling developer docs.
Nov 23 2020, 1:45 AM · Restricted Project

Oct 31 2020

gamesh411 added a comment to D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C.

Just to make sure we're on the same page -- the current approach is not flow-sensitive, and so my concern is that it won't report any true positives (not that it will be prone to false positives).

Sorry about that. You are absolutely right; what I was trying to say is CallGraph-based.

Oct 31 2020, 10:29 AM · Restricted Project, Restricted Project, Restricted Project

Oct 30 2020

gamesh411 added a comment to D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C.

One of the concerns I have with this not being a cfg-only check is that most of the bad situations are not going to be caught by the clang-tidy version of the check.

...

Have you run this check over any large code bases to see if it currently catches any true positive diagnostics?

Oct 30 2020, 4:03 AM · Restricted Project, Restricted Project, Restricted Project

Oct 19 2020

gamesh411 added a comment to D87830: [clang-tidy][test] Allow empty checks in check_clang_tidy.py.

Probably not quite as verbose but should do the job

// RUN: clang-tidy %s --checks=-*,my-check-to-test --warnings-as-errors=* -- -std=c++11
Oct 19 2020, 5:26 AM · Restricted Project
gamesh411 updated subscribers of D89528: [clang][test] Fix prefix operator++ signature in iterators.
Oct 19 2020, 1:07 AM · Restricted Project
gamesh411 added a comment to D89528: [clang][test] Fix prefix operator++ signature in iterators.

What is the context here? Did it cause any crash/bug or were you just reading through the code for a good night sleep? :D

Oct 19 2020, 1:01 AM · Restricted Project

Oct 16 2020

gamesh411 added a comment to D87830: [clang-tidy][test] Allow empty checks in check_clang_tidy.py.
Oct 16 2020, 1:39 AM · Restricted Project
gamesh411 requested review of D89528: [clang][test] Fix prefix operator++ signature in iterators.
Oct 16 2020, 12:36 AM · Restricted Project

Sep 28 2020

gamesh411 added a comment to D87830: [clang-tidy][test] Allow empty checks in check_clang_tidy.py.

Do you have some thoughts about this, should this be pursued, or do you think the use-case is not relevant?

Sep 28 2020, 1:45 AM · Restricted Project

Sep 17 2020

gamesh411 updated the diff for D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C.

Update commit message

Sep 17 2020, 7:09 AM · Restricted Project, Restricted Project, Restricted Project
gamesh411 updated the summary of D87830: [clang-tidy][test] Allow empty checks in check_clang_tidy.py.
Sep 17 2020, 7:06 AM · Restricted Project
gamesh411 updated the diff for D87830: [clang-tidy][test] Allow empty checks in check_clang_tidy.py.

Tidy up commit message

Sep 17 2020, 7:06 AM · Restricted Project
gamesh411 updated the summary of D87830: [clang-tidy][test] Allow empty checks in check_clang_tidy.py.
Sep 17 2020, 7:03 AM · Restricted Project
gamesh411 added reviewers for D87830: [clang-tidy][test] Allow empty checks in check_clang_tidy.py: aaron.ballman, lebedev.ri, alexfh, hokein, Eugene.Zelenko.
Sep 17 2020, 7:02 AM · Restricted Project
gamesh411 updated the diff for D87830: [clang-tidy][test] Allow empty checks in check_clang_tidy.py.

Update commit msg with example

Sep 17 2020, 7:00 AM · Restricted Project
gamesh411 requested review of D87830: [clang-tidy][test] Allow empty checks in check_clang_tidy.py.
Sep 17 2020, 6:55 AM · Restricted Project
gamesh411 updated the diff for D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C.

Reformat diagnostic message
Use explicit name longjmp instead of jump function
Fix liberal auto inside Collector

Sep 17 2020, 12:34 AM · Restricted Project, Restricted Project, Restricted Project
gamesh411 added a comment to D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C.

Note that there are no negative test cases that assert that we do NOT report in case a custom or an anonymous namespace is used. For that I would need a small patch in the testing infrastructure.
Patch needed in check_clang_tidy.py:

--- a/clang-tools-extra/test/clang-tidy/check_clang_tidy.py
+++ b/clang-tools-extra/test/clang-tidy/check_clang_tidy.py
@@ -167,7 +167,7 @@ def run_test_once(args, extra_args):
       subprocess.check_output(
           ['FileCheck', '-input-file=' + temp_file_name, input_file_name,
            '-check-prefixes=' + ','.join(check_fixes_prefixes),
-           '-strict-whitespace'],
+           '-strict-whitespace', '--allow-empty'],
           stderr=subprocess.STDOUT)
     except subprocess.CalledProcessError as e:
       print('FileCheck failed:\n' + e.output.decode())
@@ -180,7 +180,7 @@ def run_test_once(args, extra_args):
       subprocess.check_output(
           ['FileCheck', '-input-file=' + messages_file, input_file_name,
            '-check-prefixes=' + ','.join(check_messages_prefixes),
-           '-implicit-check-not={{warning|error}}:'],
+           '-implicit-check-not={{warning|error}}:', '--allow-empty'],
           stderr=subprocess.STDOUT)
     except subprocess.CalledProcessError as e:
       print('FileCheck failed:\n' + e.output.decode())
@@ -195,7 +195,7 @@ def run_test_once(args, extra_args):
       subprocess.check_output(
           ['FileCheck', '-input-file=' + notes_file, input_file_name,
            '-check-prefixes=' + ','.join(check_notes_prefixes),
-           '-implicit-check-not={{note|warning|error}}:'],
+           '-implicit-check-not={{note|warning|error}}:', '--allow-empty'],
           stderr=subprocess.STDOUT)
     except subprocess.CalledProcessError as e:
       print('FileCheck failed:\n' + e.output.decode())
Sep 17 2020, 12:21 AM · Restricted Project, Restricted Project, Restricted Project
gamesh411 updated the diff for D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C.

Add abort and terminate handling
Extend tests to cover every exit functions
Extract matcher bind labels

Sep 17 2020, 12:04 AM · Restricted Project, Restricted Project, Restricted Project