r356318 - [analyzer] ConditionBRVisitor: Remove GDM checking

2019-03-16 Thread Csaba Dabis via cfe-commits
Author: charusso Date: Sat Mar 16 02:16:16 2019 New Revision: 356318 URL: http://llvm.org/viewvc/llvm-project?rev=356318=rev Log: [analyzer] ConditionBRVisitor: Remove GDM checking Summary: Removed the `GDM` checking what could prevent reports made by this visitor. Now we rely on constraint

[PATCH] D59446: CodeGen: Preserve packed attribute in constStructWithPadding.

2019-03-16 Thread JF Bastien via Phabricator via cfe-commits
jfb accepted this revision. jfb added a comment. This revision is now accepted and ready to land. Nice catch! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59446/new/ https://reviews.llvm.org/D59446

[PATCH] D59463: [ASTMatchers][OpenMP] OpenMP Structured-block-related matchers

2019-03-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: gribozavr, aaron.ballman, JonasToth, george.karpenkov. lebedev.ri added projects: clang, OpenMP. Herald added subscribers: jdoerfert, guansong. Exposes the interface being added in D59214 for

r356323 - [analyzer] ConditionBRVisitor: Unknown condition evaluation support

2019-03-16 Thread Csaba Dabis via cfe-commits
Author: charusso Date: Sat Mar 16 06:47:55 2019 New Revision: 356323 URL: http://llvm.org/viewvc/llvm-project?rev=356323=rev Log: [analyzer] ConditionBRVisitor: Unknown condition evaluation support Summary: If the constraint information is not changed between two program states the analyzer has

r356322 - [analyzer] ConditionBRVisitor: Remove GDM checking

2019-03-16 Thread Csaba Dabis via cfe-commits
Author: charusso Date: Sat Mar 16 04:55:07 2019 New Revision: 356322 URL: http://llvm.org/viewvc/llvm-project?rev=356322=rev Log: [analyzer] ConditionBRVisitor: Remove GDM checking Summary: Removed the `GDM` checking what could prevent reports made by this visitor. Now we rely on constraint

[PATCH] D57860: [analyzer] Validate checker option names and values

2019-03-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 190981. Szelethus added a comment. Rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57860/new/ https://reviews.llvm.org/D57860 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/StaticAnalyzer/Frontend/CheckerRegistry.h

r356319 - [analyzer] ConditionBRVisitor: Unknown condition evaluation support

2019-03-16 Thread Csaba Dabis via cfe-commits
Author: charusso Date: Sat Mar 16 02:24:30 2019 New Revision: 356319 URL: http://llvm.org/viewvc/llvm-project?rev=356319=rev Log: [analyzer] ConditionBRVisitor: Unknown condition evaluation support Summary: If the constraint information is not changed between two program states the analyzer has

[PATCH] D54978: Move the SMT API to LLVM

2019-03-16 Thread Dan Liew via Phabricator via cfe-commits
delcypher added a comment. In D54978#1431430 , @mikhail.ramalho wrote: > Hi all, > > Sorry for the massive delay, but I just updated the `FindZ3` script to > retrieve the version from the lib. I changed it to use `try_run` instead of > `try_compile` so

[PATCH] D59214: [clang][OpeMP] Model OpenMP structured-block in AST (PR40563)

2019-03-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/AST/StmtOpenMP.cpp:40 + if (auto *LD = dyn_cast(this)) +return LD->getBody(); + return getInnermostCapturedStmt()->getCapturedStmt(); @riccibruno `getBody()` exists in `const`-only variant

[PATCH] D59214: [clang][OpeMP] Model OpenMP structured-block in AST (PR40563)

2019-03-16 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: lib/AST/StmtOpenMP.cpp:40 + if (auto *LD = dyn_cast(this)) +return LD->getBody(); + return getInnermostCapturedStmt()->getCapturedStmt(); lebedev.ri wrote: > @riccibruno > `getBody()` exists in `const`-only

[PATCH] D59455: Thread safety analysis: Add note for unlock kind mismatch

2019-03-16 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert created this revision. aaronpuchert added reviewers: aaron.ballman, delesley. Herald added a project: clang. Herald added a subscriber: cfe-commits. Similar to D56967 , we add the existing diag::note_locked_here to tell the user where we saw the

[PATCH] D59455: Thread safety analysis: Add note for unlock kind mismatch

2019-03-16 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert updated this revision to Diff 190968. aaronpuchert added a comment. Factor out some common code. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59455/new/ https://reviews.llvm.org/D59455 Files: include/clang/Analysis/Analyses/ThreadSafety.h

[PATCH] D59461: [analyzer] Fix an assertion failure if plugins added dependencies

2019-03-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, xazax.hun, baloghadamsoftware, rnkovacs. Szelethus added a project: clang. Herald added subscribers: cfe-commits, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. Szelethus added a parent

[PATCH] D54811: [analyzer] ConditionBRVisitor: Remove GDM checking

2019-03-16 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC356318: [analyzer] ConditionBRVisitor: Remove GDM checking (authored by Charusso, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D55170: [clang-format]: Add NonEmptyParentheses spacing option

2019-03-16 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. > I'm sorry for not having a positive answer here, but I'm not in favor of this > change. The style rule looks like it introduces arbitrary complexity at a > point where I don't understand at all how it matters. We cannot possibly > support all style guides

[PATCH] D54978: Move the SMT API to LLVM

2019-03-16 Thread Dan Liew via Phabricator via cfe-commits
delcypher added a comment. In D54978#1431788 , @ddcc wrote: > The only relevant commit that I can find is > https://github.com/Z3Prover/z3/commit/2cb4223979cc94e2ebc4e49a9e83adbdcd2b6979 > , but it first landed in z3 4.6.0. It looks like it's specific

[PATCH] D57855: [analyzer] Reimplement checker options

2019-03-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 190977. Szelethus edited the summary of this revision. Szelethus added a comment. - Moved every non-related change to smaller patches, this should ease **a lot** on reviewers. - Now processing options once all checkers are added to the registry. This is

[PATCH] D57922: [analyzer] Insert checker options into AnalyzerOption::ConfigTable

2019-03-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 190979. Szelethus added a comment. Rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57922/new/ https://reviews.llvm.org/D57922 Files: lib/StaticAnalyzer/Core/AnalyzerOptions.cpp lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp

r356320 - Revert "[analyzer] ConditionBRVisitor: Unknown condition evaluation support"

2019-03-16 Thread Csaba Dabis via cfe-commits
Author: charusso Date: Sat Mar 16 03:06:06 2019 New Revision: 356320 URL: http://llvm.org/viewvc/llvm-project?rev=356320=rev Log: Revert "[analyzer] ConditionBRVisitor: Unknown condition evaluation support" This reverts commit 0fe67a61cd4aec13c7969a179517f1cc06ab05cd. Modified:

[PATCH] D59453: [ASTMatchers][OpenMP] Add base ompExecutableDirective() matcher.

2019-03-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: gribozavr, aaron.ballman, JonasToth, george.karpenkov. lebedev.ri added a project: clang. Herald added subscribers: jdoerfert, guansong. Split off from D57113 . Repository: rC Clang

[PATCH] D57113: [clang-tidy] openmp-use-default-none - a new check

2019-03-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 190973. lebedev.ri edited the summary of this revision. lebedev.ri added a comment. Rebased, NFC. Moved matchers into D59453 +D57112 . Repository: rCTE Clang Tools Extra CHANGES SINCE

[PATCH] D59457: [analyzer][NFC] Use capital variable names in CheckerRegistry

2019-03-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, baloghadamsoftware, xazax.hun, rnkovacs. Szelethus added a project: clang. Herald added subscribers: cfe-commits, Charusso, jdoerfert, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, mgrang, szepet, whisperity. There are

[PATCH] D59458: [analyzer][NFC] Clang-format CheckerRegistry

2019-03-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, baloghadamsoftware, xazax.hun, rnkovacs. Szelethus added a project: clang. Herald added subscribers: cfe-commits, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. Repository: rC Clang

[PATCH] D57571: [clang-tidy] A new OpenMP module

2019-03-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 190972. lebedev.ri added a comment. Herald added a subscriber: jdoerfert. Rebased, no changes. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57571/new/ https://reviews.llvm.org/D57571 Files:

[PATCH] D54978: Move the SMT API to LLVM

2019-03-16 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. In D54978#1431430 , @mikhail.ramalho wrote: > 2. Instead of parsing `Z3_FULL_VERSION`, we can parse `Z3_MAJOR_VERSION`, > `Z3_MINOR_VERSION` and `Z3_BUILD_NUMBER` which are also available in the same > header. Sounds like this

r356321 - Revert "[analyzer] ConditionBRVisitor: Remove GDM checking"

2019-03-16 Thread Csaba Dabis via cfe-commits
Author: charusso Date: Sat Mar 16 03:44:49 2019 New Revision: 356321 URL: http://llvm.org/viewvc/llvm-project?rev=356321=rev Log: Revert "[analyzer] ConditionBRVisitor: Remove GDM checking" This reverts commit f962485adad9d646511fd3240c0408d9554e6784. Modified:

[PATCH] D59214: [clang][OpeMP] Model OpenMP structured-block in AST (PR40563)

2019-03-16 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: lib/AST/StmtOpenMP.cpp:40 + if (auto *LD = dyn_cast(this)) +return LD->getBody(); + return getInnermostCapturedStmt()->getCapturedStmt(); lebedev.ri wrote: > riccibruno wrote: > > lebedev.ri wrote: > > >

[PATCH] D57112: [ASTTypeTraits][ASTMatchers][OpenMP] OMPClause handling

2019-03-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 190965. lebedev.ri marked 3 inline comments as done. lebedev.ri retitled this revision from "[ASTTypeTraits] OMPClause handling" to "[ASTTypeTraits][ASTMatchers][OpenMP] OMPClause handling". lebedev.ri edited the summary of this revision. lebedev.ri added

[PATCH] D59461: [analyzer] Fix an assertion failure if plugins added dependencies

2019-03-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Don't let the testcase fool you, it's merely added because there wasn't any for that particular case, I still need to add the plugin, but that moves quite a few files around, so I might separate that to another patch. Repository: rC Clang CHANGES SINCE LAST

[PATCH] D59449: [clang-tidy] Integrate clang-tidy-diff.py machinery into run-clang-tidy.py

2019-03-16 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. zinovy.nis added reviewers: alexfh, bkramer. zinovy.nis added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun. Herald added a reviewer: serge-sans-paille. Herald added a project: clang. This patch adds a new `--diff[=2]` option to

[PATCH] D59214: [clang][OpeMP] Model OpenMP structured-block in AST (PR40563)

2019-03-16 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: include/clang/AST/StmtOpenMP.h:274 + /// Prerequisite: Executable Directive must not be Standalone directive. + const Stmt *getStructuredBlock() const; }; Uh, and what about the non-const version of

[PATCH] D59214: [clang][OpeMP] Model OpenMP structured-block in AST (PR40563)

2019-03-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/AST/StmtOpenMP.cpp:40 + if (auto *LD = dyn_cast(this)) +return LD->getBody(); + return getInnermostCapturedStmt()->getCapturedStmt(); riccibruno wrote: > lebedev.ri wrote: > > @riccibruno > > `getBody()`

[PATCH] D59402: Fix-it hints for -Wmissing-{prototypes,variable-declarations}

2019-03-16 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert updated this revision to Diff 190966. aaronpuchert added a comment. Don't suggest adding `static` if there is a non-prototype declaration. This required a minor refactoring: we let `ShouldWarnAboutMissingPrototype` return any kind of declaration it finds and check for the number of

[PATCH] D59459: [analyzer][NFC] Prefer binary searches in CheckerRegistry

2019-03-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: xazax.hun, NoQ, baloghadamsoftware, rnkovacs. Szelethus added a project: clang. Herald added subscribers: cfe-commits, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. Szelethus added a parent

[PATCH] D59464: [analyzer] Add an example plugin for checker dependency handling

2019-03-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, xazax.hun, rnkovacs, baloghadamsoftware. Szelethus added a project: clang. Herald added subscribers: cfe-commits, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity, mgorny. - Move

[PATCH] D59446: CodeGen: Preserve packed attribute in constStructWithPadding.

2019-03-16 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356328: CodeGen: Preserve packed attribute in constStructWithPadding. (authored by pcc, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D59195: [analyzer] Remove the default value arg from getChecker*Option

2019-03-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 190993. Szelethus added a comment. Rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59195/new/ https://reviews.llvm.org/D59195 Files: include/clang/StaticAnalyzer/Core/AnalyzerOptions.h

[PATCH] D57860: [analyzer] Validate checker option names and values

2019-03-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 190992. Szelethus added a comment. Add a test case for checker plugins. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57860/new/ https://reviews.llvm.org/D57860 Files: include/clang/Basic/DiagnosticDriverKinds.td

[PATCH] D59466: [clang-tidy] openmp-exception-escape - a new check

2019-03-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: JonasToth, aaron.ballman, baloghadamsoftware. lebedev.ri added projects: clang-tools-extra, OpenMP. Herald added subscribers: jdoerfert, guansong, rnkovacs, xazax.hun, mgorny. Herald added a project: clang. Finally, we are here!

[PATCH] D59467: [clang] Adding the Likely Attribute from C++2a to AST

2019-03-16 Thread Gauthier via Phabricator via cfe-commits
Tyker created this revision. Tyker added a reviewer: aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. attributes after an if like: if (...) [[likely]] are now applied on the if instead of the following statement. i added the likely attribute in the

[PATCH] D59463: [ASTMatchers][OpenMP] OpenMP Structured-block-related matchers

2019-03-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:6421 +/// +/// Prerequisite: the executable directive must not be standalone directive. +/// What happens if this prereq is not met? Does the matcher return false, or does

[PATCH] D59465: [analyzer] Add example plugin for checker option handling

2019-03-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, xazax.hun, rnkovacs, baloghadamsoftware. Szelethus added a project: clang. Herald added subscribers: cfe-commits, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity, mgorny. Repository: rC

[PATCH] D57858: [analyzer] Add a new frontend flag to display all checker options

2019-03-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 190997. Szelethus added a comment. Add a test case for then checker plugin. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57858/new/ https://reviews.llvm.org/D57858 Files: include/clang/Driver/CC1Options.td

[PATCH] D57112: [ASTTypeTraits][ASTMatchers][OpenMP] OMPClause handling

2019-03-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri marked an inline comment as done. lebedev.ri added inline comments. Comment at: include/clang/AST/ASTTypeTraits.h:81 + /// \{ + /// Return the AST node kind of this ASTNodeKind. aaron.ballman wrote: > These markings are a bit strange, can you

[PATCH] D57112: [ASTTypeTraits][ASTMatchers][OpenMP] OMPClause handling

2019-03-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/ASTTypeTraits.h:81 + /// \{ + /// Return the AST node kind of this ASTNodeKind. These markings are a bit strange, can you explain them to me? Comment at:

[PATCH] D59453: [ASTMatchers][OpenMP] Add base ompExecutableDirective() matcher.

2019-03-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from a nit. Comment at: lib/ASTMatchers/Dynamic/Registry.cpp:508 REGISTER_MATCHER(withInitializer); + REGISTER_MATCHER(ompExecutableDirective);

r356328 - CodeGen: Preserve packed attribute in constStructWithPadding.

2019-03-16 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Sat Mar 16 12:25:39 2019 New Revision: 356328 URL: http://llvm.org/viewvc/llvm-project?rev=356328=rev Log: CodeGen: Preserve packed attribute in constStructWithPadding. Otherwise the object may have an incorrect size due to tail padding. Differential Revision:

[PATCH] D54978: Move the SMT API to LLVM

2019-03-16 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. In D54978#1431935 , @delcypher wrote: > Would one of you be able to file a bug against Z3 to fix this? I am no longer > in a position to contribute to Z3 so I can't do this. I've opened https://github.com/Z3Prover/z3/issues/2184 .

[PATCH] D59463: [ASTMatchers][OpenMP] OpenMP Structured-block-related matchers

2019-03-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:6421 +/// +/// Prerequisite: the executable directive must not be standalone directive. +/// aaron.ballman wrote: > What happens if this prereq is not met? Does the matcher

[PATCH] D57922: [analyzer] Insert checker options into AnalyzerOption::ConfigTable

2019-03-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 190991. Szelethus added a comment. Add a test case for checker plugins. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57922/new/ https://reviews.llvm.org/D57922 Files: lib/StaticAnalyzer/Core/AnalyzerOptions.cpp

[PATCH] D59195: [analyzer] Remove the default value arg from getChecker*Option

2019-03-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 190996. Szelethus added a comment. Remove the default argument from the plugin, also add a test case for it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59195/new/ https://reviews.llvm.org/D59195 Files:

[PATCH] D59448: [WebAssembly] Change wasm.throw intrinsic's first argument to immediate

2019-03-16 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin created this revision. aheejin added a reviewer: dschuff. Herald added subscribers: cfe-commits, sunfish, jgravelle-google, sbc100. Herald added a project: clang. After D57825 (r355981), intrinsic arguments that are marked as `ImmArg` only can take

[PATCH] D55170: [clang-format]: Add NonEmptyParentheses spacing option

2019-03-16 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I'm happy to be wrong, but In current master, SpaceBeforeCpp11BracedList is a boolean not an enum (but I think I've seen a review changing it somewhere which maybe isn't landed)