[PATCH] D66627: [clang-tidy] add checks to bugprone-posix-return

2019-08-27 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 217532. jcai19 added a comment. Fix format and test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66627/new/ https://reviews.llvm.org/D66627 Files: clang-tools-extra/clang-tidy/bugprone/PosixReturnChec

[PATCH] D66627: [clang-tidy] add checks to bugprone-posix-return

2019-08-27 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked 3 inline comments as done. jcai19 added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:70 +- New :doc:`bugprone-posix-return + ` check. Eugene.Zelenko wrote: > Check is not new, just modified. Such check should be after new

[PATCH] D58497: Clear the KnownModules cache if the preprocessor is going away

2019-08-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Do we need `KnownModules` at all? It seems to serve a very similar purpose to the `Modules` string map on `ModuleMap`. (The main difference seems to be that `KnownModules` can cache module load failures.) If we can keep only a single data structure tracking this, owned b

[PATCH] D66839: Fix stack address builtin for negative numbers

2019-08-27 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. We usually prefer to generate error messages for incorrect parameters to builtins in SemaChecking.cpp. I don't think there's really an infinite loop here. The parameter to __builtin_frame_address is an unsigned integer; values greater than 0x7FFU aren't special.

r370129 - Re-land [clang-scan-deps] Minimizer: Correctly handle multi-line content with CR+LF line endings

2019-08-27 Thread Alexandre Ganea via cfe-commits
Author: aganea Date: Tue Aug 27 17:04:06 2019 New Revision: 370129 URL: http://llvm.org/viewvc/llvm-project?rev=370129&view=rev Log: Re-land [clang-scan-deps] Minimizer: Correctly handle multi-line content with CR+LF line endings Previously, an #error directive with quoted, multi-line content, a

[PATCH] D66556: [clang-scan-deps] Minimizer: Correctly handle multi-line content with CR+LF line endings

2019-08-27 Thread Alexandre Ganea via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL370129: Re-land [clang-scan-deps] Minimizer: Correctly handle multi-line content with… (authored by aganea, committed by )

[PATCH] D66847: [analyzer] Fix analyzer warnings.

2019-08-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a_sidorin, rnkovacs, Szelethus, baloghadamsoftware, Charusso. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet. Herald added a project: clang. They ain't gonna fix themselves... wel

[PATCH] D66847: [analyzer] Fix analyzer warnings.

2019-08-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 217537. NoQ edited the summary of this revision. NoQ added a comment. Use `auto` in one more place. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66847/new/ https://reviews.llvm.org/D66847 Files: clang/include/clang/StaticAnalyzer/Core/PathSensitive/

r370130 - [ObjC] Fix type checking for qualified id block parameters.

2019-08-27 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Tue Aug 27 17:25:06 2019 New Revision: 370130 URL: http://llvm.org/viewvc/llvm-project?rev=370130&view=rev Log: [ObjC] Fix type checking for qualified id block parameters. When checking if block types are compatible, we are checking for compatibility their return types and p

[PATCH] D66831: [ObjC] Fix type checking for qualified id block parameters.

2019-08-27 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Thanks for the fast review. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66831/new/ https://reviews.llvm.org/D66831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[PATCH] D66831: [ObjC] Fix type checking for qualified id block parameters.

2019-08-27 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL370130: [ObjC] Fix type checking for qualified id block parameters. (authored by vsapsai, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D66850: Do not attempt visit child nodes of NULL type

2019-08-27 Thread Bert Belder via Phabricator via cfe-commits
piscisaureus created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D66850 Files: clang/include/clang/AST/ASTNodeTraverser.h Index: clang/include/clang/AST/ASTNodeTraverser.h ===

[PATCH] D66847: [analyzer] Fix analyzer warnings.

2019-08-27 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. > if the dyn_ part is really necessary here, then you crash with a null > dereference a few lines below because you didn't check the result Hmm, can we detect things like this?: if (i

[PATCH] D66850: Avoid crash when dumping NULL Type as JSON

2019-08-27 Thread Bert Belder via Phabricator via cfe-commits
piscisaureus updated this revision to Diff 217545. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66850/new/ https://reviews.llvm.org/D66850 Files: clang/lib/AST/JSONNodeDumper.cpp Index: clang/lib/AST/JSONNodeDumper.cpp

[PATCH] D66847: [analyzer] Fix analyzer warnings.

2019-08-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked an inline comment as done. NoQ added a comment. In D66847#1648209 , @Szelethus wrote: > > if the dyn_ part is really necessary here, then you crash with a null > > dereference a few lines below because you didn't check the result > > Hmm, can w

[PATCH] D66847: [analyzer] Fix analyzer warnings.

2019-08-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I mean, such code should indeed be refactored to query the custom RTTI only once, but given that it's locally obvious that there's no null dereference in this code, we should not be emitting a warning on it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66847/new/

r370141 - Fix "commas at the end of enumerator lists are a C99-specific"

2019-08-27 Thread Vitaly Buka via cfe-commits
Author: vitalybuka Date: Tue Aug 27 18:04:50 2019 New Revision: 370141 URL: http://llvm.org/viewvc/llvm-project?rev=370141&view=rev Log: Fix "commas at the end of enumerator lists are a C99-specific" Modified: cfe/trunk/include/clang-c/Index.h Modified: cfe/trunk/include/clang-c/Index.h URL:

r370142 - Revert "Change the X86 datalayout to add three address spaces for 32 bit signed, "

2019-08-27 Thread Vlad Tsyrklevich via cfe-commits
Author: vlad.tsyrklevich Date: Tue Aug 27 18:08:54 2019 New Revision: 370142 URL: http://llvm.org/viewvc/llvm-project?rev=370142&view=rev Log: Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," This reverts commit r370083 because it caused check-lld failures on san

[PATCH] D66733: [analyzer] Add a checker option to detect nested dead stores

2019-08-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Mmm, i don't know what was that commit meant to fix. Your evaluation looks fairly sufficient for turning it on by default. Let's make it an on-by-default option and flip the flag back into off-by-default if it turns out to be somehow broken. Comment at:

Re: r370083 - Change the X86 datalayout to add three address spaces for 32 bit signed,

2019-08-27 Thread Vitaly Buka via cfe-commits
llvm-project/lld/test/ELF/lto/Inputs/drop-debug-info.bc needs to be updated http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/34675/steps/check-lld%20msan/logs/stdio /usr/local/google/home/vitalybuka/slow/bbot/llvm_build/bin/ld.lld -shared /usr/local/google/home/vitalybuka/slow/

[PATCH] D66856: [Sema] Suppress -Wformat diagnostics for bool types when printed using %hhd

2019-08-27 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: aaron.ballman, Nathan-Huckleberry. Herald added subscribers: ributzka, dexonsmith, jkorous. Herald added a project: clang. Instead, emit them under -Wformat-pedantic. This is particularly important for us because we have a lo

r370143 - [Clang][Bundler] Do not require host triple for extracting device bundles

2019-08-27 Thread Sergey Dmitriev via cfe-commits
Author: sdmitriev Date: Tue Aug 27 18:26:13 2019 New Revision: 370143 URL: http://llvm.org/viewvc/llvm-project?rev=370143&view=rev Log: [Clang][Bundler] Do not require host triple for extracting device bundles Bundler currently requires host triple to be provided no matter if you are performing

[PATCH] D66847: [analyzer] Fix analyzer warnings.

2019-08-27 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Another common mistake is this: if (A) { const auto *B = dyn_cast_or_null(A); // warn: A is known to be non-null, prefer dyn_cast } CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66847/new/ https://reviews.llvm.org/D66847 __

[PATCH] D66601: [Clang][Bundler] Do not require host triple for extracting device bundles

2019-08-27 Thread Sergey Dmitriev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL370143: [Clang][Bundler] Do not require host triple for extracting device bundles (authored by sdmitriev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed pri

[PATCH] D66847: [analyzer] Fix analyzer warnings.

2019-08-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D66847#1648209 , @Szelethus wrote: > if (isa(D)) { > const auto *FD = dyn_cast(D); // warn: D is known to be a > FunctionDecl, prefer using cast<> > // ... > } > In D66847#1648339

[PATCH] D66847: [analyzer] Fix analyzer warnings.

2019-08-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Filed the remaining false positive back on myself as https://bugs.llvm.org/show_bug.cgi?id=43135. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66847/new/ https://reviews.llvm.org/D66847 ___ cfe-commits mailing list cf

[PATCH] D66765: [analyzer] (Urgent!) Add 9.0.0. release notes.

2019-08-27 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 217564. Szelethus added a comment. Fixing inlines! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66765/new/ https://reviews.llvm.org/D66765 Files: clang/docs/ClangStaticAnalyzer.rst clang/docs/ReleaseNotes.rst Index: clang/docs/ReleaseNotes

[PATCH] D66765: [analyzer] (Urgent!) Add 9.0.0. release notes.

2019-08-27 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked 10 inline comments as done. Szelethus added a comment. In D66765#1646237 , @NoQ wrote: > I approve the patch and i don't see anything obvious that we're missing out > (@Szelethus, your GSoC isn't on by default back in 9.0, only in master,

[PATCH] D66668: [OPENMP][Analysis] Add analysis of the map clauses.

2019-08-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Yes please! :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D8/new/ https://reviews.llvm.org/D8 ___ cfe-commit

r370151 - Fixup build of clang-interpreter example after change in r370122.

2019-08-27 Thread Douglas Yung via cfe-commits
Author: dyung Date: Tue Aug 27 19:13:24 2019 New Revision: 370151 URL: http://llvm.org/viewvc/llvm-project?rev=370151&view=rev Log: Fixup build of clang-interpreter example after change in r370122. This should fix the build failure on llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast. Modified: cfe

[PATCH] D66360: Expose constructing a virtual method dispatch through the include/clang/CodeGen APIs.

2019-08-27 Thread Parker Schuh via Phabricator via cfe-commits
pschuh updated this revision to Diff 217566. pschuh added a comment. Herald added a subscriber: mgorny. Your suggestions of pulling the builder out as an API and exposing CGCallee made everything a lot simpler. Unfortunately, I had to split the CGCallee header because it threatened to pull EHSco

[PATCH] D66839: Fix stack address builtin for negative numbers

2019-08-27 Thread Zoe Carver via Phabricator via cfe-commits
zoecarver added a comment. Thanks for the explanation. Should I then not try to "fix" the issue? Or should I update sema checking? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66839/new/ https://reviews.llvm.org/D66839

[clang-tools-extra] r370155 - [clang-doc] Use llvm::createStringError and canonicalize error messages

2019-08-27 Thread Fangrui Song via cfe-commits
Author: maskray Date: Tue Aug 27 19:56:03 2019 New Revision: 370155 URL: http://llvm.org/viewvc/llvm-project?rev=370155&view=rev Log: [clang-doc] Use llvm::createStringError and canonicalize error messages "Bad block found.\n" -> "bad block found" The lower cased form with no full stop or newlin

[PATCH] D66783: [clang-doc] Use llvm::createStringError and canonicalize error messages

2019-08-27 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL370155: [clang-doc] Use llvm::createStringError and canonicalize error messages (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: r

[PATCH] D61446: Generalize the pass registration mechanism used by Polly to any third-party tool

2019-08-27 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. Sorry for the break. Unfortunately the patch does not apply cleanly anymore. Can you rebase to latest trunk? I surprisingly did not know about `__declspec(selectany)`. I still think having the symbol only defined in that loadable module, but not in the statically li

[PATCH] D66862: Make lround builtin constexpr (and others)

2019-08-27 Thread Zoe Carver via Phabricator via cfe-commits
zoecarver created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D66862 Files: clang/lib/AST/ExprConstant.cpp clang/test/SemaCXX/math-builtins.cpp Index: clang/test/SemaCXX/math-builtins.c

<    1   2   3