[PATCH] D53781: [ASTMatchers] add a matcher for static locals

2018-10-29 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech added a comment. I do. Repository: rC Clang https://reviews.llvm.org/D53781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53781: [ASTMatchers] add a matcher for static locals

2018-10-26 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech created this revision. jranieri-grammatech added reviewers: aaron.ballman, klimek, sbenza. Herald added a subscriber: cfe-commits. This adds a matcher, isStaticLocal, that matches local static variables (i.e. VarDecl::isStaticLocal). Repository: rC Clang

[PATCH] D54222: [clang-tidy/checks] Add a checker to detect returning static locals in public headers

2018-11-07 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech created this revision. jranieri-grammatech added reviewers: aaron.ballman, alexfh, NoQ. Herald added subscribers: cfe-commits, mgorny. This adds a checker, llvm-problematic-statics, that detects functions in header files that return the address of a local static variable.

[PATCH] D52905: CSA: fix accessing GDM data from shared libraries

2018-10-04 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech created this revision. Herald added subscribers: cfe-commits, mgorny. The `GDMIndex` functions return a pointer that's used as a key for looking up data, but addresses of local statics defined in header files aren't the same across shared library boundaries and the result is

[PATCH] D52906: CSA: allow plugins built as shared libraries to receive events

2018-10-04 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech created this revision. Herald added a subscriber: cfe-commits. Event types are uniqued by using the addresses of a local static defined in a header files, but it isn't the same across shared library boundaries and plugins can't currently handle ImplicitNullDerefEvents.

[PATCH] D52905: CSA: fix accessing GDM data from shared libraries

2018-10-09 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech added a comment. In https://reviews.llvm.org/D52905#1257040, @NoQ wrote: > Hmmm, interesting. A checker doesn't usually need to access these specific > static locals, at least not directly. These are usually accessed through > functions in .cpp files that are supposed to be

[PATCH] D52905: [analyzer] fix accessing GDM data from shared libraries

2018-10-09 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech updated this revision to Diff 168815. jranieri-grammatech added a comment. Added more context. Repository: rC Clang https://reviews.llvm.org/D52905 Files: include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeMap.h

[PATCH] D65206: [analyzer] Fix text range end columns in SARIF to be exclusive

2019-08-27 Thread Joe Ranieri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG68a6a28ef835: Fix text range end columns in SARIF to be exclusive (authored by jranieri-grammatech). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D65209: [analyzer] Fix a SARIF exporter crash with macro expansions

2019-08-27 Thread Joe Ranieri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3385c5cc4dfd: Fix a SARIF exporter crash with macro expansions (authored by jranieri-grammatech). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65209/new/

[PATCH] D65212: [analyzer] Fix exporting SARIF files from scan-build on Windows

2019-08-09 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech marked an inline comment as done. jranieri-grammatech added inline comments. Comment at: clang/tools/scan-build/libexec/ccc-analyzer:121 END { - if (defined $ResultFile && -z $ResultFile) { unlink($ResultFile); NoQ wrote: > Whoops. I

[PATCH] D65209: [analyzer] Fix a SARIF exporter crash with macro expansions

2019-07-24 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech created this revision. jranieri-grammatech added reviewers: NoQ, george.karpenkov, aaron.ballman. Herald added subscribers: cfe-commits, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: clang.

[PATCH] D65211: [analyzer] Update the SARIF exporter to SARIF 2.1

2019-07-24 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech created this revision. jranieri-grammatech added reviewers: NoQ, george.karpenkov, aaron.ballman. Herald added subscribers: cfe-commits, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: clang.

[PATCH] D65212: [analyzer] Fix exporting SARIF files from scan-build on Windows

2019-07-24 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech created this revision. jranieri-grammatech added reviewers: NoQ, jordan_rose, dcoughlin, george.karpenkov, aaron.ballman. Herald added subscribers: cfe-commits, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald

[PATCH] D65206: [analyzer] Fix text range end columns in SARIF to be exclusive

2019-07-24 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech created this revision. jranieri-grammatech added reviewers: george.karpenkov, NoQ, aaron.ballman. Herald added subscribers: cfe-commits, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: clang.

[PATCH] D65212: [analyzer] Fix exporting SARIF files from scan-build on Windows

2019-07-24 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech updated this revision to Diff 211578. jranieri-grammatech added a comment. Update an additional place that used -z. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65212/new/ https://reviews.llvm.org/D65212 Files:

[PATCH] D65212: [analyzer] Fix exporting SARIF files from scan-build on Windows

2019-07-24 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech added a comment. In D65212#1599841 , @aaron.ballman wrote: > LGTM! Do you need someone to commit on your behalf? Please. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65212/new/

[PATCH] D70689: [analyzer] Fix SARIF column locations

2019-11-25 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech created this revision. jranieri-grammatech added a reviewer: aaron.ballman. Herald added subscribers: cfe-commits, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: clang. This fixes SARIF

[PATCH] D70689: [analyzer] Fix SARIF column locations

2019-12-20 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech marked 4 inline comments as done. jranieri-grammatech added inline comments. Comment at: clang/test/Analysis/diagnostics/sarif-multi-diagnostic-test.c:35-36 +{ + int løçål = 0; + /* ☃ */ return 1 / løçål; // expected-warning {{Division by zero}} +}

[PATCH] D70689: [analyzer] Fix SARIF column locations

2019-12-20 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech updated this revision to Diff 234971. jranieri-grammatech added a comment. Addressed review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70689/new/ https://reviews.llvm.org/D70689 Files:

[PATCH] D70689: [analyzer] Fix SARIF column locations

2020-01-14 Thread Joe Ranieri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5ee616a710bc: [analyzer] Fix SARIF column locations (authored by jranieri-grammatech). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70689/new/

[PATCH] D70689: [analyzer] Fix SARIF column locations

2019-12-23 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech marked an inline comment as not done. jranieri-grammatech added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp:157 + const MemoryBuffer *Buf = SM.getBuffer(LocInfo.first); + assert(Buf && "got a NULL buffer for the

[PATCH] D70689: [analyzer] Fix SARIF column locations

2019-12-24 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech updated this revision to Diff 235219. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70689/new/ https://reviews.llvm.org/D70689 Files: clang/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp

[PATCH] D76083: [clang-tidy] Expand the list of functions in bugprone-unused-return-value

2020-03-12 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech created this revision. jranieri-grammatech added reviewers: aaron.ballman, alexfh, hokein, xazax.hun. Herald added a subscriber: rnkovacs. Herald added a project: clang. This change adds common C, C++, and POSIX functions to the clang-tidy unused return value checker. We ran

[PATCH] D76083: [clang-tidy] Expand the list of functions in bugprone-unused-return-value

2020-03-13 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech updated this revision to Diff 250202. jranieri-grammatech added a comment. Adding context. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76083/new/ https://reviews.llvm.org/D76083 Files:

[PATCH] D76083: [clang-tidy] Expand the list of functions in bugprone-unused-return-value

2020-03-16 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech updated this revision to Diff 250545. jranieri-grammatech marked an inline comment as done. jranieri-grammatech added a comment. Removing std::move. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76083/new/

[PATCH] D76083: [clang-tidy] Expand the list of functions in bugprone-unused-return-value

2020-03-16 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UnusedReturnValueCheck.cpp:57 + "::std::map::lower_bound;" + "::std::move;" +

[PATCH] D76083: [clang-tidy] Expand the list of functions in bugprone-unused-return-value

2020-05-07 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech added a comment. Ping? It sounds like the consensus is to commit this as-is and, if there's a negative fallout for users of clang-tidy, either split out the functions or pare the list down later? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D54222: [clang-tidy] Add a check to detect returning static locals in public headers

2020-09-24 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech added a comment. In D54222#1290789 , @JonasToth wrote: > I agree with @Eugene.Zelenko that this check should rather live in > `bugprone-` as the issue its diagnosing is not LLVM specific. It is ok to add > an alias into the llvm

[PATCH] D54222: [clang-tidy] Add a check to detect returning static locals in public headers

2020-10-01 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech updated this revision to Diff 295563. jranieri-grammatech added a comment. Herald added a project: clang. In D54222#2295374 , @JonasToth wrote: > Do you have data for other projects? As this is not a very common thing and > probably

[PATCH] D76083: [clang-tidy] Expand the list of functions in bugprone-unused-return-value

2020-05-22 Thread Joe Ranieri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe4bb3e25e440: [clang-tidy] Expand the list of functions in bugprone-unused-return-value (authored by jranieri-grammatech). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D54222: [clang-tidy] Add a check to detect returning static locals in public headers

2020-09-18 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech added a comment. @JonasToth It looks like there are some outstanding review comments that need to be addressed. I've gotten some time allocated to work on this next week. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54222/new/