[PATCH] D68551: [clang-format] [NFC] Ensure clang-format is itself clang-formatted.

2019-10-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D68551#1696598 , @Eugene.Zelenko wrote: > If clang-format if clang-formatted now completely, I think will be good idea > to add rule to check this during build, like Polly does. This is a great idea... Do you know if

[PATCH] D68551: [clang-format] [NFC] Ensure clang-format is itself clang-formatted.

2019-10-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I think when polly's script detects a change it's just showing the diff, this might be so much nicer if we could implement D68554: [clang-format] Proposal for clang-format to give compiler style warnings Repository: rC Clang

[PATCH] D68539: [clang-tidy] fix for readability-identifier-naming incorrectly fixes variables which become keywords

2019-10-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I logged the original bug and I like it! I think the warning is better than mutating with a prefix, Thank you. I'll let the code owners approve it, but you have my vote! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D67122: [UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour

2019-10-07 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Ping. Friendly remainder that the unsanitized UB is still being miscompiled. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67122/new/ https://reviews.llvm.org/D67122 ___

[PATCH] D54834: [analyzer][MallocChecker] Improve warning messages on double-delete errors

2019-10-07 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa82810c56bc9: [analyzer][MallocChecker] Improve warning messages on double-delete errors (authored by Szelethus). Herald added a subscriber: Charusso. Herald added a project: clang. Changed prior to

[PATCH] D68564: [clangd] Catch an unchecked "Expected" in HeaderSourceSwitch.

2019-10-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68564/new/ https://reviews.llvm.org/D68564

[clang-tools-extra] r373892 - [clangd] If an undocumented definition exists, don't accept documentation from other forward decls.

2019-10-07 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Oct 7 03:53:56 2019 New Revision: 373892 URL: http://llvm.org/viewvc/llvm-project?rev=373892=rev Log: [clangd] If an undocumented definition exists, don't accept documentation from other forward decls. Summary: This fixes cases like: foo.h class Undocumented{}

[PATCH] D68569: [clang-format] Also look for .{ext}.clang-format file

2019-10-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Thanks for the patch, I think I understand what you are trying to do, but I have a few questions. Is the premise here that you need slightly different styles for .cpp than for .h? could you explain why? whilst I can see there is value in having such fine

[PATCH] D34096: [Sema][C++1z] Ensure structured binding's bindings in dependent foreach have non-null type

2019-10-07 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG21ff345d64b9: [Sema][C++1z] Ensure binding in dependent range for have non-null type (authored by erik.pilkington). Herald added subscribers: ributzka, dexonsmith, jkorous. Herald added a project: clang.

[PATCH] D31540: Prefer non-friend to friend in in redeclaration chain

2019-10-07 Thread Yaron Keren 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 rG27e2ff964fc3: Address http://bugs.llvm.org/pr30994 so that a non-friend can properly replace… (authored by yaron.keren).

[PATCH] D68554: [clang-format] Proposal for clang-format to give compiler style warnings

2019-10-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Using a suggestion from D68551: [clang-format] [NFC] Ensure clang-format is itself clang-formatted. as an example of its usefulness, I modified my clang-format CMakeList.txt to do as Polly does and add clang-format check rules,

[PATCH] D68569: [clang-format] Also look for .{ext}.clang-format file

2019-10-07 Thread Anders Waldenborg via Phabricator via cfe-commits
wanders created this revision. wanders added a reviewer: clang-format. wanders added a project: clang-format. Herald added a project: clang. E.g: When formatting foo.cpp it will look for .cpp.clang-format This makes it easy to different formatting for .c/.h files and .cpp/.hpp files

[PATCH] D68568: [clang-format] Make '.clang-format' variants finding a loop

2019-10-07 Thread Anders Waldenborg via Phabricator via cfe-commits
wanders created this revision. wanders added a reviewer: clang-format. wanders added a project: clang-format. Herald added a project: clang. No functional change intended Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D68568 Files: clang/lib/Format/Format.cpp Index:

[PATCH] D68565: [clang] Add test for FindNextToken in Lexer.

2019-10-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Could you add a rationale in the change description? E.g. something like `we do not have any tests for findNextToken` Comment at: clang/unittests/Lex/LexerTest.cpp:559 + } + EXPECT_EQ(ExpectedTokens, GeneratedByNextToken); +}

[PATCH] D68569: [clang-format] Also look for .{ext}.clang-format file

2019-10-07 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D68569#1697248 , @wanders wrote: > The "Language" option can not distinguish between C and C++. > > We have projects which contains both C and C++ code. Using different style > (yes..) for C and C++. Our C++ headers are

r373896 - [ASTImporter][NFC] Enable disabled but passing test

2019-10-07 Thread Gabor Marton via cfe-commits
Author: martong Date: Mon Oct 7 04:34:54 2019 New Revision: 373896 URL: http://llvm.org/viewvc/llvm-project?rev=373896=rev Log: [ASTImporter][NFC] Enable disabled but passing test RedeclChainShouldBeCorrectAmongstNamespaces Modified: cfe/trunk/unittests/AST/ASTImporterTest.cpp Modified:

[PATCH] D68568: [clang-format] Make '.clang-format' variants finding a loop

2019-10-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Thank you for the patch, I think this looks cleaner and generally LGTM, I think its always good to put a little description of the change along with the NFC in the title to let people know that functionally there isn't any change without having to work though

[PATCH] D68565: [clang] Add test for FindNextToken in Lexer.

2019-10-07 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 223524. usaxena95 marked an inline comment as done. usaxena95 added a comment. Addressed comments and fixed build failure. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68565/new/

[PATCH] D67159: [clang] New __attribute__((__clang_arm_mve_alias)).

2019-10-07 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked an inline comment as done. simon_tatham added inline comments. Comment at: clang/lib/AST/Decl.cpp:3107 +if (!ArmMveAliasValid(BuiltinID, getIdentifier()->getName())) { + getASTContext().getDiagnostics().Report( +getLocation(),

[PATCH] D68565: [clang] Add test for FindNextToken in Lexer.

2019-10-07 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 created this revision. usaxena95 added a reviewer: ilya-biryukov. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D68565 Files: clang/unittests/Lex/LexerTest.cpp Index:

[PATCH] D53066: [Driver] Use forward slashes in most linker arguments

2019-10-07 Thread Martin Storsjö 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 rGcbd73574e43e: Reapply: [Driver] Use forward slashes in most linker arguments (authored by mstorsjo). Herald added a

r373895 - [ASTImporter][NFC] Update ASTImporter internals docs

2019-10-07 Thread Gabor Marton via cfe-commits
Author: martong Date: Mon Oct 7 04:15:18 2019 New Revision: 373895 URL: http://llvm.org/viewvc/llvm-project?rev=373895=rev Log: [ASTImporter][NFC] Update ASTImporter internals docs Modified: cfe/trunk/docs/InternalsManual.rst Modified: cfe/trunk/docs/InternalsManual.rst URL:

r373894 - [ASTImporter][NFC] Fix typo in user docs

2019-10-07 Thread Gabor Marton via cfe-commits
Author: martong Date: Mon Oct 7 04:14:53 2019 New Revision: 373894 URL: http://llvm.org/viewvc/llvm-project?rev=373894=rev Log: [ASTImporter][NFC] Fix typo in user docs Modified: cfe/trunk/docs/LibASTImporter.rst Modified: cfe/trunk/docs/LibASTImporter.rst URL:

[PATCH] D68569: [clang-format] Also look for .{ext}.clang-format file

2019-10-07 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. I'm not seeing any merrit this brings over existing https://clang.llvm.org/docs/ClangFormatStyleOptions.html `Language` option. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68569/new/ https://reviews.llvm.org/D68569

r373887 - clang-cl: Ignore the new /ZH options

2019-10-07 Thread Hans Wennborg via cfe-commits
Author: hans Date: Mon Oct 7 02:30:15 2019 New Revision: 373887 URL: http://llvm.org/viewvc/llvm-project?rev=373887=rev Log: clang-cl: Ignore the new /ZH options These were added to the MS docs in https://github.com/MicrosoftDocs/cpp-docs/commit/85b9b6967e58e485251450f7451673f6fc873e88 and are

[PATCH] D68562: [clangd] Add RemoveUsingNamespace tweak.

2019-10-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. The main comment is about limiting this only to global namespace. PTAL. Comment at: clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp:79 +} +} // namespace + continue rest of the file in the anonymous namespace

[clang-tools-extra] r373897 - [clangd] Catch an unchecked "Expected" in HeaderSourceSwitch.

2019-10-07 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Oct 7 04:37:25 2019 New Revision: 373897 URL: http://llvm.org/viewvc/llvm-project?rev=373897=rev Log: [clangd] Catch an unchecked "Expected" in HeaderSourceSwitch. Summary: Also fixes a potential user-after-scope issue of "Path". Reviewers: kadircet Subscribers:

[PATCH] D68565: [clang] Add test for FindNextToken in Lexer.

2019-10-07 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 223503. usaxena95 added a comment. Revert unintended formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68565/new/ https://reviews.llvm.org/D68565 Files: clang/unittests/Lex/LexerTest.cpp Index:

[PATCH] D68562: [clangd] Add RemoveUsingNamespace tweak.

2019-10-07 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 created this revision. Herald added subscribers: cfe-commits, kadircet, arphaman, mgrang, jkorous, MaskRay, ilya-biryukov, mgorny. Herald added a project: clang. Removes the 'using namespace' under the cursor and qualifies all accesses in the current file. E.g.: using namespace

[PATCH] D68564: [clangd] Catch an unchecked "Expected" in HeaderSourceSwitch.

2019-10-07 Thread Merge Guard [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. Bulid results are available at http://results.llvm-merge-guard.org/Phabricator-13 See http://jenkins.llvm-merge-guard.org/job/Phabricator/13/ for more details. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D55125: [clang-tidy] Fix a false positive in misc-redundant-expression check

2019-10-07 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp updated this revision to Diff 223501. dkrupp marked 5 inline comments as done. dkrupp added a comment. Thanks @aaron.ballman and @alexfh for your review. I fixed your findings. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55125/new/ https://reviews.llvm.org/D55125 Files:

[PATCH] D68569: [clang-format] Also look for .{ext}.clang-format file

2019-10-07 Thread Anders Waldenborg via Phabricator via cfe-commits
wanders added a comment. The "Language" option can not distinguish between C and C++. We have projects which contains both C and C++ code. Using different style (yes..) for C and C++. Our C++ headers are named hpp. In our toplevel we have the following symlinks .c.clang-format ->

[PATCH] D68569: [clang-format] Also look for .{ext}.clang-format file

2019-10-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Comment at: clang/lib/Format/Format.cpp:2603 llvm::SmallVector FilesToLookFor; + Nit: almost every file has an extension should this be 3? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D68467: [clangd] If an undocumented definition exists, don't accept documentation from other forward decls.

2019-10-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68467/new/ https://reviews.llvm.org/D68467

[PATCH] D68564: [clangd] Catch an unchecked "Expected" in HeaderSourceSwitch.

2019-10-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added subscribers: usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Also fixes a potential user-after-scope issue of "Path". Repository: rG LLVM Github Monorepo

[clang-tools-extra] r373889 - [clangd] Collect missing macro references.

2019-10-07 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Oct 7 03:10:31 2019 New Revision: 373889 URL: http://llvm.org/viewvc/llvm-project?rev=373889=rev Log: [clangd] Collect missing macro references. Summary: Semantic highlghting is missing a few macro references. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous,

[PATCH] D61627: [clang driver] Allow -fembed-bitcode combined with -mno-red-zone

2019-10-07 Thread Anders Waldenborg via Phabricator via cfe-commits
wanders abandoned this revision. wanders added a comment. I might revisit this later. But carrying this patch locally for now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61627/new/ https://reviews.llvm.org/D61627

[PATCH] D68569: [clang-format] Also look for .{ext}.clang-format file

2019-10-07 Thread Anders Waldenborg via Phabricator via cfe-commits
wanders added a comment. This depends on https://reviews.llvm.org/D68568 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68569/new/ https://reviews.llvm.org/D68569 ___ cfe-commits mailing list

[PATCH] D68565: [clang] Add test for FindNextToken in Lexer.

2019-10-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68565/new/ https://reviews.llvm.org/D68565

r373905 - RewriteModernObjC - silence static analyzer getAs<> null dereference warnings. NFCI.

2019-10-07 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Mon Oct 7 06:58:15 2019 New Revision: 373905 URL: http://llvm.org/viewvc/llvm-project?rev=373905=rev Log: RewriteModernObjC - silence static analyzer getAs<> null dereference warnings. NFCI. The static analyzer is warning about potential null dereferences, but in these

r373911 - Sema - silence static analyzer getAs<> null dereference warnings. NFCI.

2019-10-07 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Mon Oct 7 07:25:46 2019 New Revision: 373911 URL: http://llvm.org/viewvc/llvm-project?rev=373911=rev Log: Sema - silence static analyzer getAs<> null dereference warnings. NFCI. The static analyzer is warning about potential null dereferences, but in these cases we should

Re: r373743 - [NFCI] Improve the -Wbool-operation's warning message

2019-10-07 Thread Nico Weber via cfe-commits
FWIW I found the "always evaluates to 'true'" bit important to understand the warning. We did hit this (at least once) in Chromium after all [1] (looks like a real bug – nothing for you to do about that, and thanks for the warning), and I don't think I would've understood what the warning wanted

[PATCH] D67536: [WIP] [clangd] Add support for an inactive regions notification

2019-10-07 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. One thing that may be worth considering as well, is that if the client prefers to highlight the text of the line only, it can calculate the length of the line itself. In VSCode for instance, the line lengths are readily available; I imagine other editors are similar

[PATCH] D68574: [libTooling] Add `toString` method to the Stencil class

2019-10-07 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 223573. ymandel added a comment. comment tweaks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68574/new/ https://reviews.llvm.org/D68574 Files: clang/include/clang/Tooling/Refactoring/Stencil.h

[PATCH] D67837: [CUDA][HIP] Fix host/device check with -fopenmp

2019-10-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaCUDA.cpp:604 // Do we know that we will eventually codegen the given function? static bool IsKnownEmitted(Sema , FunctionDecl *FD) { + return S.getEmissionStatus(FD) == Sema::FunctionEmissionStatus::Emitted;

[PATCH] D67536: [WIP] [clangd] Add support for an inactive regions notification

2019-10-07 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked 5 inline comments as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/Compiler.cpp:66 CI->getLangOpts()->CommentOpts.ParseAllComments = true; + CI->getPreprocessorOpts().DetailedRecord = true; return CI; ilya-biryukov

r373916 - [libTooling] Add `toString` method to the Stencil class

2019-10-07 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Mon Oct 7 09:20:22 2019 New Revision: 373916 URL: http://llvm.org/viewvc/llvm-project?rev=373916=rev Log: [libTooling] Add `toString` method to the Stencil class Summary: `toString` generates a string representation of the stencil. Patch by Harshal T. Lehri. Reviewers:

[PATCH] D67161: [clang,ARM] Initial ACLE intrinsics for MVE.

2019-10-07 Thread Dave Green via Phabricator via cfe-commits
dmgreen added subscribers: samparker, SjoerdMeijer. dmgreen added a comment. This is looking good to me. My understanding is that is has some dependencies? The llvm side will likely needed to go in first, plus a couple of clang patches? Comment at:

[PATCH] D68481: [clang-format] [PR27004] omits leading space for noexcept when formatting operator delete()

2019-10-07 Thread Mitchell via Phabricator via cfe-commits
mitchell-stellar accepted this revision. mitchell-stellar added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68481/new/ https://reviews.llvm.org/D68481 ___ cfe-commits

[PATCH] D28213: [Frontend] Correct values of ATOMIC_*_LOCK_FREE to match builtin

2019-10-07 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdc155744c82f: [Frontend] Correct values of ATOMIC_*_LOCK_FREE to match builtin (authored by mgorny). Herald added a subscriber: dexonsmith. Herald added a project: clang. Changed prior to commit:

[PATCH] D68574: [libTooling] Add `toString` method to the Stencil class

2019-10-07 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a project: clang. `toString` generates a string representation of the stencil. Patch by Harshal T. Lehri. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D68574 Files:

[PATCH] D68574: [libTooling] Add `toString` method to the Stencil class

2019-10-07 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 223566. ymandel added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68574/new/ https://reviews.llvm.org/D68574 Files: clang/include/clang/Tooling/Refactoring/Stencil.h

[PATCH] D68562: [clangd] Add RemoveUsingNamespace tweak.

2019-10-07 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 223592. usaxena95 marked 3 inline comments as done. usaxena95 added a comment. Make the tweak trigger only for TopLevelDecl. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68562/new/

[PATCH] D68584: Fix Calling Convention through aliases

2019-10-07 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: rnk, pcc. Herald added a subscriber: hiraditya. Herald added a project: LLVM. r369697 changed the behavior of stripPointerCasts to no longer include aliases. However, the code in CGDeclCXX.cpp's createAtExitStub counted on the looking

[PATCH] D68574: [libTooling] Add `toString` method to the Stencil class

2019-10-07 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 223619. ymandel added a comment. fix comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68574/new/ https://reviews.llvm.org/D68574 Files: clang/include/clang/Tooling/Refactoring/Stencil.h

[PATCH] D67159: [clang] New __attribute__((__clang_arm_mve_alias)).

2019-10-07 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 223550. simon_tatham added a comment. Moved the diagnostic into `SemaDeclAttr.cpp` as suggested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67159/new/ https://reviews.llvm.org/D67159 Files:

[PATCH] D22834: Added 'inline' attribute to basic_string's destructor

2019-10-07 Thread Aditya Kumar 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 rGb839888af8f2: Added inline attribute to basic_strings destructor (authored by hiraditya). Herald added subscribers:

r373904 - AST - silence static analyzer getAs<> null dereference warnings. NFCI.

2019-10-07 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Mon Oct 7 06:58:05 2019 New Revision: 373904 URL: http://llvm.org/viewvc/llvm-project?rev=373904=rev Log: AST - silence static analyzer getAs<> null dereference warnings. NFCI. The static analyzer is warning about potential null dereferences, but in these cases we should

[PATCH] D68213: [LTO] Support for embedding bitcode section during LTO

2019-10-07 Thread Josef Eisl via Phabricator via cfe-commits
zapster added a comment. (ping) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68213/new/ https://reviews.llvm.org/D68213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r373910 - [clang] Add test for FindNextToken in Lexer.

2019-10-07 Thread Utkarsh Saxena via cfe-commits
Author: usaxena95 Date: Mon Oct 7 07:20:46 2019 New Revision: 373910 URL: http://llvm.org/viewvc/llvm-project?rev=373910=rev Log: [clang] Add test for FindNextToken in Lexer. Reviewers: ilya-biryukov Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68565

Re: r371605 - [Diagnostics] Add -Wsizeof-array-div

2019-10-07 Thread Nico Weber via cfe-commits
I gave this another try now that we have a compiler with rL372600. Another thing the warning currently warns on is code like this: char memory[kOpcodeMemory]; OpcodeFactory opcode_maker(memory, sizeof(memory)); size_t count = sizeof(memory) / sizeof(PolicyOpcode); or int32_t

[PATCH] D68581: Include leading attributes in DeclStmt's SourceRange

2019-10-07 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg created this revision. sberg added reviewers: aaron.ballman, rsmith, Nathan-Huckleberry. Herald added a project: clang. For a `DeclStmt` like [[maybe_unused]] int i; `getBeginLoc()` returned the start of `int` instead of the start of `[[` (see

[PATCH] D67159: [clang] New __attribute__((__clang_arm_mve_alias)).

2019-10-07 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked an inline comment as done. simon_tatham added inline comments. Comment at: clang/lib/AST/Decl.cpp:3107 +if (!ArmMveAliasValid(BuiltinID, getIdentifier()->getName())) { + getASTContext().getDiagnostics().Report( +getLocation(),

[PATCH] D20561: Warn when taking address of packed member

2019-10-07 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf7b9f3149b76: Add missing tests (authored by rogfer01). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D20561?vs=67807=223564#toc Repository: rG LLVM Github Monorepo

[PATCH] D67536: [WIP] [clangd] Add support for an inactive regions notification

2019-10-07 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 223577. nridge added a comment. Update to use `PPCallbacks::SourceRangeSkipped` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67536/new/ https://reviews.llvm.org/D67536 Files:

[PATCH] D67536: [WIP] [clangd] Add support for an inactive regions notification

2019-10-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:140 } +// Add inactive highlighting tokens. +const SourceManager = AST.getSourceManager(); I think this comment could be clearer, e.g. // Add tokens

[PATCH] D67536: [WIP] [clangd] Add support for an inactive regions notification

2019-10-07 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked 2 inline comments as done. nridge added a comment. How would one even measure the line length? `SourceManager` doesn't sem to have a method like `getLineLength()` or similar. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67536/new/

Re: r373743 - [NFCI] Improve the -Wbool-operation's warning message

2019-10-07 Thread Dávid Bolvanský via cfe-commits
Okey, I will see what I can do (I know I need to move checking code somewhere else). > Dňa 7. 10. 2019 o 16:54 užívateľ Nico Weber napísal: > ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: r373743 - [NFCI] Improve the -Wbool-operation's warning message

2019-10-07 Thread Dávid Bolvanský via cfe-commits
Typo was fixed some days ago :) Odoslané z iPhonu > Dňa 7. 10. 2019 o 17:22 užívateľ Arthur O'Dwyer > napísal: > >  >> On Mon, Oct 7, 2019 at 10:59 AM Dávid Bolvanský via cfe-commits >> wrote: > >> Okey, I will see what I can do (I know I need to move checking code >> somewhere else). >>

[PATCH] D68574: [libTooling] Add `toString` method to the Stencil class

2019-10-07 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Tooling/Refactoring/Stencil.h:54 + /// Constructs a string representation of the StencilPart. StencilParts + /// generated by the

[PATCH] D68526: [Diagnostics] Silence -Wsizeof-array-div for character buffers

2019-10-07 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. @tkanis wrote in post commit review: “What do you think about also not emitting the warning if the lhs sizeof is an array of signed or unsigned char? The warning wants the rhs sizeof to be sizeof(char) which is 1, and dividing by that doesn't really make sense. ” I

[PATCH] D68578: [HIP] Fix device stub name

2019-10-07 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Could you elaborate on how exactly current implementation does not work? I would expect the kernel and the stub to be two distinct entities, as far as debugger is concerned. It does have enough information to track each independently (different address, .stub suffix,

[PATCH] D24119: [libc++] add linker option "-Wl,-z,defs" in standalone build

2019-10-07 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4601ac04c738: [cmake] Add linker option -Wl,-z,defs in standalone build (authored by mgorny). Herald added subscribers: libcxx-commits, ldionne, christof. Herald added a project: libc++. Changed prior to

[PATCH] D67536: [WIP] [clangd] Add support for an inactive regions notification

2019-10-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D67536#1697533 , @nridge wrote: > How would one even measure the line length? `SourceManager` doesn't sem to > have a method like `getLineLength()` or similar. Yes, there is no existing API for that, I think you'd need to get

[PATCH] D67536: [WIP] [clangd] Add support for an inactive regions notification

2019-10-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D67536#1697533 , @nridge wrote: > How would one even measure the line length? `SourceManager` doesn't sem to > have a method like `getLineLength()` or similar. If you look at functions like `offsetToPosition` in

Re: r371605 - [Diagnostics] Add -Wsizeof-array-div

2019-10-07 Thread Dávid Bolvanský via cfe-commits
D68526 should fix it. Take a look please. > Dňa 7. 10. 2019 o 17:09 užívateľ Nico Weber napísal: > >  > I gave this another try now that we have a compiler with rL372600. Another > thing the warning currently warns on is code like this: > > char memory[kOpcodeMemory]; > OpcodeFactory

[PATCH] D67536: [WIP] [clangd] Add support for an inactive regions notification

2019-10-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D67536#1697696 , @nridge wrote: > One thing that may be worth considering as well, is that if the client > prefers to highlight the text of the line only, it can calculate the length > of the line itself. In VSCode for

[PATCH] D67536: [WIP] [clangd] Add support for an inactive regions notification

2019-10-07 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D67536#1694098 , @MaskRay wrote: > Why "inactive region", not "skipped ranges"? I got the name from "$cquery/publishInactiveRegions" :) But I don't particularly care what we call it. Repository: rG LLVM Github Monorepo

[PATCH] D28213: [Frontend] Correct values of ATOMIC_*_LOCK_FREE to match builtin

2019-10-07 Thread James Y Knight via Phabricator via cfe-commits
jyknight reopened this revision. jyknight added a comment. This revision is now accepted and ready to land. The close was due to phabricator problem, reopening. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D28213/new/

[PATCH] D68562: [clangd] Add RemoveUsingNamespace tweak.

2019-10-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp:86 + if (const Decl *ParentDecl = Node->Parent->ASTNode.get()) { +return llvm::isa(ParentDecl); + } NIT: remove redundant `{}` around this

r373950 - Fix for expanding __pragmas in macro arguments

2019-10-07 Thread Amy Huang via cfe-commits
Author: akhuang Date: Mon Oct 7 12:41:53 2019 New Revision: 373950 URL: http://llvm.org/viewvc/llvm-project?rev=373950=rev Log: Fix for expanding __pragmas in macro arguments Summary: Avoid parsing __pragma into an annotation token when macro arguments are pre-expanded. This is what clang

[PATCH] D68590: [clangd] Improve hover support for Objective-C

2019-10-07 Thread David Goldman via Phabricator via cfe-commits
dgoldman created this revision. dgoldman added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, kadircet, jfb, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. - Instead of `AppDelegate::application:didFinishLaunchingWithOptions:` you will now

r373952 - [OPENMP]Fix caonical->canonical, NFC.

2019-10-07 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Oct 7 12:57:40 2019 New Revision: 373952 URL: http://llvm.org/viewvc/llvm-project?rev=373952=rev Log: [OPENMP]Fix caonical->canonical, NFC. Fixed typo. Modified: cfe/trunk/include/clang/AST/StmtOpenMP.h cfe/trunk/lib/CodeGen/CGStmtOpenMP.cpp Modified:

[PATCH] D68587: [hip] Assume host-only compilation if the final phase is ahead of `backend`.

2019-10-07 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D68587#1698055 , @tra wrote: > I'm fine with this for -E/-M, > > I would argue that with `-fsyntax-only` we want to know whether our source > code, which is common for all sub-compilations, has syntactic errors. > The way we

[PATCH] D68377: [Builtins] Teach Clang about memccpy

2019-10-07 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Current solution does not work /home/xbolva00/LLVM/llvm/tools/clang/include/clang/Basic/Builtins.h:50:34: error: redefinition of ‘BImemccpy’ #define BUILTIN(ID, TYPE, ATTRS) BI##ID, ^ /home/xbolva00/LLVM/llvm/tools/clang/include/clang/Basic/Builtins.h:50:34: note:

[PATCH] D68587: [hip] Assume host-only compilation if the final phase is ahead of `backend`.

2019-10-07 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D68587#1698102 , @hliao wrote: > for most compilation tools, single input and single output are expected. > Without assuming `-fsyntax-only` alone is host-compilation only, that at > least run syntax checking twice. I believe

r373973 - [Diagnostics] Emit better -Wbool-operation's warning message if we known that the result is always true

2019-10-07 Thread David Bolvansky via cfe-commits
Author: xbolva00 Date: Mon Oct 7 14:57:03 2019 New Revision: 373973 URL: http://llvm.org/viewvc/llvm-project?rev=373973=rev Log: [Diagnostics] Emit better -Wbool-operation's warning message if we known that the result is always true Modified:

Re: r373743 - [NFCI] Improve the -Wbool-operation's warning message

2019-10-07 Thread Dávid Bolvanský via cfe-commits
"FWIW I found the "always evaluates to 'true'" bit important to understand the warning." Yeah. I moved this check somewhere else, so we can print precise message: r373973 should emit "bitwise negation of a boolean expression always evaluates to 'true'; did you mean logical negation?" where

[PATCH] D66035: [WebAssembly] WIP: Add support for reference types

2019-10-07 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. Another approach to reference types we should look at is clang's upcoming sizeless types support (https://reviews.llvm.org/D62962, RFC: http://lists.llvm.org/pipermail/cfe-dev/2019-June/062523.html). This would allow reference types to be constructed at the source

[PATCH] D68591: [analyzer] PR43551: Do not dereferce void* in UndefOrNullArgVisitor

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

r373977 - Add VFS support for sanitizers' blacklist

2019-10-07 Thread Jan Korous via cfe-commits
Author: jkorous Date: Mon Oct 7 15:36:19 2019 New Revision: 373977 URL: http://llvm.org/viewvc/llvm-project?rev=373977=rev Log: Add VFS support for sanitizers' blacklist Differential Revision: https://reviews.llvm.org/D67742 Added:

[PATCH] D68587: [hip] Assume host-only compilation if the final phase is ahead of `backend`.

2019-10-07 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. I'm fine with this for -E/-M, I would argue that with `-fsyntax-only` we want to know whether our source code, which is common for all sub-compilations, has syntactic errors. The way we compile HIP & CUDA sources, some of the errors will only be reported on one side of

[clang-tools-extra] r373951 - Attempt to fix a few clang-tidy tests on Windows, see PR43593.

2019-10-07 Thread Nico Weber via cfe-commits
Author: nico Date: Mon Oct 7 12:54:19 2019 New Revision: 373951 URL: http://llvm.org/viewvc/llvm-project?rev=373951=rev Log: Attempt to fix a few clang-tidy tests on Windows, see PR43593. Modified: clang-tools-extra/trunk/test/clang-tidy/bugprone-branch-clone.cpp

[PATCH] D68410: [AttrDocs] document always_inline

2019-10-07 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. > In D68410#1696411 , @joerg wrote: > >> I wonder if we should actually enumerate evil here, i.e. give the situations >> in which inlining actually fails. > > > Which is likely to change over time. I worry that enumerating

Re: r373743 - [NFCI] Improve the -Wbool-operation's warning message

2019-10-07 Thread Dávid Bolvanský via cfe-commits
Hm, there is no "bitwise negation of a boolean expression always evaluates to 'true'; did you mean logical negation?" for chromium case. I will try to fix it. ut 8. 10. 2019 o 0:03 Dávid Bolvanský napísal(a): > > "FWIW I found the "always evaluates to 'true'" bit important to > understand the

[PATCH] D29039: [clang-format] Proposal for clang-format -r option

2019-10-07 Thread Mitchell via Phabricator via cfe-commits
mitchell-stellar added a subscriber: djasper. mitchell-stellar added a comment. I agree with @djasper that this is outside the scope of clang-format. git for Windows gives you a full set of bash utilities to utilize, so doing stuff like this on Windows is much easier now. Repository: rL

[PATCH] D67985: CFI: wrong type passed to llvm.type.test with multiple inheritance devirtualization

2019-10-07 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added subscribers: pcc, filcab. filcab added a comment. It seems there's a FIXME anticipating this problem. @pcc: Can you double-check, please? Thank you, Filipe Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67985/new/

r373936 - [clang] [cmake] Support LLVM_DISTRIBUTION_COMPONENTS in stand-alone build

2019-10-07 Thread Michal Gorny via cfe-commits
Author: mgorny Date: Mon Oct 7 11:14:56 2019 New Revision: 373936 URL: http://llvm.org/viewvc/llvm-project?rev=373936=rev Log: [clang] [cmake] Support LLVM_DISTRIBUTION_COMPONENTS in stand-alone build Differential Revision: https://reviews.llvm.org/D68412 Modified: cfe/trunk/CMakeLists.txt

[PATCH] D68526: [Diagnostics] Silence -Wsizeof-array-div for character buffers

2019-10-07 Thread Nico Weber via Phabricator via cfe-commits
thakis accepted this revision. thakis added a comment. Thanks, I think this is a good change. It fixes a false positive in wayland and one somewhere in Chromium's windows sandbox. See the commit thread of r371605 for examples. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D68535: Fix loop unrolling initialization in the new pass manager

2019-10-07 Thread Alina Sbirlea via Phabricator via cfe-commits
asbirlea added a comment. Maybe elaborate in the patch description what `determine when and how we will unroll loops.` means? e.g.: "The default before and after this patch is for LoopUnroll to be enabled, and for it to use a cost model to determine whether to unroll the loop (`OnlyWhenForced

  1   2   >