[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] 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 https://reviews.llvm.org/

[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] 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 ___ cfe

[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, c

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&view=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

[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(), diag::err_attrib

[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 std;

[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 https://reviews.llvm.org

[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&view=rev Log: [clangd] Collect missing macro references. Summary: Semantic highlghting is missing a few macro references. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous

[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 ___

[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 commi

[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: clang/unittests/Lex/LexerTes

[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 projec

[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&view=rev Log: [clangd] If an undocumented definition exists, don't accept documentation from other forward decls. Summary: This fixes cases like: foo.h class Undocument

[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] 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 https://reviews.llvm.org/D68564

[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: clang/l

[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 withi

[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 cfe-commit

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&view=rev Log: [ASTImporter][NFC] Fix typo in user docs Modified: cfe/trunk/docs/LibASTImporter.rst Modified: cfe/trunk/docs/LibASTImporter.rst URL: http://llvm.org/viewvc/

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&view=rev Log: [ASTImporter][NFC] Update ASTImporter internals docs Modified: cfe/trunk/docs/InternalsManual.rst Modified: cfe/trunk/docs/InternalsManual.rst URL: http://ll

[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 =

[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 control

[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: clan

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&view=rev Log: [ASTImporter][NFC] Enable disabled but passing test RedeclChainShouldBeCorrectAmongstNamespaces Modified: cfe/trunk/unittests/AST/ASTImporterTest.cpp Modifie

[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&view=rev Log: [clangd] Catch an unchecked "Expected" in HeaderSourceSwitch. Summary: Also fixes a potential user-after-scope issue of "Path". Reviewers: kadircet Subscribers: i

[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: c

[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

[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); +} N

[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 the

[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 -> clang-format/

[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/ https://reviews.llvm.org/D68

[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 https://reviews

[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] 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 nam

[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). H

[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 __

[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: clang/inc

[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(), diag::err_attrib

[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: https:

[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 t

[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_string's destructor (authored by hiraditya). Herald added subscribers: lib

[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: clang/include/clang/Tooling

[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 clang/lib/Too

[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&id=223564#toc Repository: rG LLVM Github Monore

[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 clang/lib/T

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&view=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 sho

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&view=rev Log: RewriteModernObjC - silence static analyzer getAs<> null dereference warnings. NFCI. The static analyzer is warning about potential null dereferences, but in thes

[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 CH

[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: clang-tools-extra/clangd/ParsedA

[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 &SM = AST.getSourceManager(); I think this comment could be clearer, e.g. // Add tokens in

[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 &S, 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

[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/ h

[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

[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/ https://reviews.llvm.org/D

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&view=rev Log: [clang] Add test for FindNextToken in Lexer. Reviewers: ilya-biryukov Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D6

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&view=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 sh

[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/ https://reviews.llvm.org/D2821

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

2019-10-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, rjmccall, hliao. Herald added a subscriber: erik.pilkington. HIP emits a device stub function for each kernel in host code. The HIP debugger requires device stub function to have a different unmangled name as the kernel. Currently the n

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 f

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 https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[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 SourceCode.

[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

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 fds[sizeof(b

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 opc

[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 sinc

[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 `r

[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 http://lists.llvm.org/pipermail/cfe-dev/201

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

2019-10-07 Thread Arthur O'Dwyer via cfe-commits
On Mon, Oct 7, 2019 at 10:59 AM Dávid Bolvanský via cfe-commits < cfe-commits@lists.llvm.org> wrote: > 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: > > FWIW I found the "always evaluates to 'tru

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] 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] 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 ag

[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 clang/lib/Tool

[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, perhap

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&view=rev Log: [libTooling] Add `toString` method to the Stencil class Summary: `toString` generates a string representation of the stencil. Patch by Harshal T. Lehri. Reviewer

[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 insta

[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 mailin

[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: clang/include/clang/Basic/Di

[PATCH] D66647: [clangd] DefineInline action apply logic with fully qualified names

2019-10-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 223620. kadircet marked 9 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66647/new/ https://reviews.llvm.org/D66647 Files: clang-tools-ex

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

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. I agree that a system in place that either enforces clang-formatting on commit or after the fact would be ideal. Otherwise, I don't see a need to have to approve the

[PATCH] D53768: Add VerboseOutputStream to CompilerInstance

2019-10-07 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53768/new/ https://reviews.llvm.org/D53768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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

[PATCH] D66647: [clangd] DefineInline action apply logic with fully qualified names

2019-10-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp:196 + +std::string Qualifier = printNamespaceScope(*ND->getDeclContext()); +if (auto Err = Replacements.add( ilya-biryukov wrote: > You would want to use

r373918 - Codegen - silence static analyzer getAs<> null dereference warnings. NFCI.

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

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

2019-10-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D68578#1697822 , @tra wrote: > 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 enou

[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 LLVM

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

2019-10-07 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:235 CGF.CGM.getContext().getTargetInfo().getCXXABI())) || + CGF.getLangOpts().HIP || getDeviceStubName(getDeviceSideName(CGF.CurFuncDecl)) == keeping the original asse

r373921 - [clang-format] [NFC] Ensure clang-format is itself clang-formatted.

2019-10-07 Thread Paul Hoad via cfe-commits
Author: paulhoad Date: Mon Oct 7 09:53:35 2019 New Revision: 373921 URL: http://llvm.org/viewvc/llvm-project?rev=373921&view=rev Log: [clang-format] [NFC] Ensure clang-format is itself clang-formatted. Summary: Before making a proposed change, ensure ClangFormat.cpp is fully clang-formatted, n

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

2019-10-07 Thread Mitchell via Phabricator via cfe-commits
mitchell-stellar added a comment. I don't care for the command line switches that try to emulate compiler flags. I am also of the opinion that external scripts should be used for this functionality. git for Windows gives you a full set of bash utilities to utilize, so doing stuff like this on W

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

2019-10-07 Thread Paul Hoad via cfe-commits
Author: paulhoad Date: Mon Oct 7 10:03:44 2019 New Revision: 373922 URL: http://llvm.org/viewvc/llvm-project?rev=373922&view=rev Log: [clang-format] [PR27004] omits leading space for noexcept when formatting operator delete() Summary: clang-format is incorrectly thinking the parameter parens ar

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-10-07 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 223624. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63960/new/ https://reviews.llvm.org/D63960 Files: clang/include/clang/AST/DeclCXX.h clang/include/clang/Basic/DiagnosticASTKinds.td clang/include/clang/Basic/DiagnosticSemaKinds.td clang/inc

[clang-tools-extra] r373924 - [clangd] Fix raciness in code completion tests

2019-10-07 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Mon Oct 7 10:12:18 2019 New Revision: 373924 URL: http://llvm.org/viewvc/llvm-project?rev=373924&view=rev Log: [clangd] Fix raciness in code completion tests Reviewers: sammccall, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang

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

2019-10-07 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. The tests broke the build on some platforms because of the use of raw strings in macros. Fixing now... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68574/new/ https://reviews.llvm.org/D68574 ___

[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/ https://reviews.llvm

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

2019-10-07 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Can you add a CodeGenCXX test as well, please? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67985/new/ https://reviews.llvm.org/D67985 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D68584: Fix Calling Convention through aliases

2019-10-07 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:251 // Make sure the call and the callee agree on calling convention. - if (llvm::Function *dtorFn = - dyn_cast(dtor.ge

  1   2   >