[clang-tools-extra] r340038 - [clang-tidy] Abseil: integral division of Duration check

2018-08-17 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Aug 17 08:19:19 2018 New Revision: 340038 URL: http://llvm.org/viewvc/llvm-project?rev=340038&view=rev Log: [clang-tidy] Abseil: integral division of Duration check This check is an abseil specific test that tests to ensure users utilize abseil specific floating point di

[PATCH] D50389: [clang-tidy] Abseil: integral division of Duration check

2018-08-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein closed this revision. hokein added a comment. Committed in https://reviews.llvm.org/rL340038. https://reviews.llvm.org/D50389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50904: [analyzer][UninitializedObjectChecker] Added documentation to the checker list

2018-08-17 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: george.karpenkov, NoQ, rnkovacs, xazax.hun. Herald added subscribers: cfe-commits, mikhail.ramalho, a.sidorin, szepet, whisperity. I'm not too sure that this aligns with the very short descriptions of other checkers, but I don't see how

[PATCH] D50889: [clangd] Make FileIndex aware of the main file

2018-08-17 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 161260. ilya-biryukov added a comment. - Reverted changes to FileIndex, use merged index instead Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50889 Files: clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/index/FileIndex.cp

[PATCH] D50835: [clangd] Add parantheses while auto-completing functions.

2018-08-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/CodeComplete.cpp:1379 + Kind == CompletionItemKind::Method) && + SnippetSuffix.front() == '(' && SnippetSuffix.back() == ')') { + // Check whether function has any parameters or not. n

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 161261. kadircet marked 10 inline comments as done. kadircet added a comment. - Resolve discussions & Delete enclosing quotes when normalizing. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50502 Files: clangd/CMakeLists.txt clangd/Ca

[PATCH] D50889: [clangd] Make FileIndex aware of the main file

2018-08-17 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Still missing tests, but otherwise should be good to review. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clangd/ClangdLSPServer.cpp:621 + std::lock_guard Lock(TaskHandlesMutex); + const auto &it = TaskHandles.find(Params.ID); + if (it != TaskHandles.end()) { ilya-biryukov wrote

[PATCH] D50904: [analyzer][UninitializedObjectChecker] Added documentation to the checker list

2018-08-17 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 161262. Szelethus added a comment. Removed a TODO from the checker file. https://reviews.llvm.org/D50904 Files: lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp www/analyzer/alpha_checks.html Index: www/analyzer/alpha_ch

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-17 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg updated this revision to Diff 161263. hugoeg marked 5 inline comments as done. hugoeg added a comment. applied corrections form comments https://reviews.llvm.org/D50542 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt clang-tidy/abseil/NoInternalDepsCh

[PATCH] D50845: [CUDA/OpenMP] Define only some host macros during device compilation

2018-08-17 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. In https://reviews.llvm.org/D50845#1202540, @ABataev wrote: > Maybe for device compilation we also should define `__NO_MATH_INLINES` and > `__NO_STRING_INLINES` macros to disable inline assembly in glibc? Coming back to this original question: - I just searched the h

[PATCH] D50835: [clangd] Add parantheses while auto-completing functions.

2018-08-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/CodeComplete.cpp:1381 + // Check whether function has any parameters or not. + LSP.textEdit->newText += SnippetSuffix.size() > 2 ? "(${0})" : "()"; +} ioeric wrote: > I think we are missing one case

[PATCH] D50835: [clangd] Add parantheses while auto-completing functions.

2018-08-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 161265. kadircet marked 3 inline comments as done. kadircet added a comment. - Resolve discussions. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50835 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h unittests/clangd/CodeComple

[PATCH] D50847: [clangd] Add callbacks on parsed AST in addition to parsed preambles

2018-08-17 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/TUScheduler.cpp:406 // We only need to build the AST if diagnostics were requested. if (WantDiags == WantDiagnostics::No) return; hokein wrote: > The AST might not get built if `WantDiags::N

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-17 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg added inline comments. Comment at: clang-tidy/abseil/NoInternalDepsCheck.cpp:20 + +bool IsInAbseilFile(const SourceManager& manager, SourceLocation loc){ + if (loc.isInvalid()) { hokein wrote: > I think we can make it as an ASTMatcher instead of a functio

[PATCH] D50835: [clangd] Add parantheses while auto-completing functions.

2018-08-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lgtm Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

Re: r338385 - [RISCV] Add driver for riscv32-unknown-elf baremetal target

2018-08-17 Thread Nico Weber via cfe-commits
It's two weeks later and I'm still seeing this warning. Any news? On Fri, Aug 3, 2018 at 9:29 AM Dávid Bolvanský wrote: > Such filename fix could be part of https://reviews.llvm.org/D50246 > > pi 3. 8. 2018 o 15:17 Nico Weber napísal(a): > >> I'm getting this warning from the mac linker after t

[clang-tools-extra] r340040 - [clangd] Add parantheses while auto-completing functions.

2018-08-17 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Fri Aug 17 08:42:54 2018 New Revision: 340040 URL: http://llvm.org/viewvc/llvm-project?rev=340040&view=rev Log: [clangd] Add parantheses while auto-completing functions. Summary: Currently we only add parantheses to the functions if snippets are enabled, which also inserts

[PATCH] D50835: [clangd] Add parantheses while auto-completing functions.

2018-08-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340040: [clangd] Add parantheses while auto-completing functions. (authored by kadircet, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D50835

r340041 - [CodeGen] Merge identical block descriptor global variables.

2018-08-17 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Aug 17 08:46:07 2018 New Revision: 340041 URL: http://llvm.org/viewvc/llvm-project?rev=340041&view=rev Log: [CodeGen] Merge identical block descriptor global variables. Currently, clang generates a new block descriptor global variable for each new block literal. This co

[PATCH] D50783: [CodeGen] Merge identical block descriptor global variables

2018-08-17 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340041: [CodeGen] Merge identical block descriptor global variables. (authored by ahatanak, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D50

[PATCH] D50783: [CodeGen] Merge identical block descriptor global variables

2018-08-17 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC340041: [CodeGen] Merge identical block descriptor global variables. (authored by ahatanak, committed by ). Repository: rC Clang https://reviews.llvm.org/D50783 Files: lib/CodeGen/CGBlocks.cpp lib

Re: [libcxx] r339943 - Establish the header. NFC yet. Reviewed as https://reviews.llvm.org/D50815

2018-08-17 Thread Marshall Clow via cfe-commits
On Thu, Aug 16, 2018 at 3:30 PM, Vitaly Buka wrote: > This brakes some bots > http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/22441 > > /b/sanitizer-x86_64-linux-fast/build/libcxx_build_msan/include/c++/v1/algorithm:648:10: > fatal error: 'bit' file not found > #include >

[PATCH] D50896: [clangd] Add xrefs LSP boilerplate implementation.

2018-08-17 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This change LG, but I would not commit it before we have an actual implementation. As soon as we have the `references` function in `ClangdUnit.cpp` implemented, the merge of this change should be trivial. Is there any value in committing empty stubs before an actu

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 161273. kbobyrev marked 3 inline comments as done. kbobyrev added a comment. Address all the comment, except the one about True iterators. https://reviews.llvm.org/D50337 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex

[PATCH] D50337: [clangd] DexIndex implementation prototype

2018-08-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. I should create another patch with True iterator to address the last comment. Comment at: clang-tools-extra/clangd/index/dex/DexIndex.cpp:97 +// Add OR iterator for scopes if the request contains scopes. +

[PATCH] D50905: [analyzer][UninitializedObjectChecker][WIP] Explicit namespace resolution for inherited data members

2018-08-17 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, george.karpenkov, xazax.hun, rnkovacs. Herald added subscribers: cfe-commits, mikhail.ramalho, a.sidorin, szepet, whisperity. For the following example: struct Base { int x; }; // In a different translation unit s

Re: [libcxx] r339943 - Establish the header. NFC yet. Reviewed as https://reviews.llvm.org/D50815

2018-08-17 Thread Marshall Clow via cfe-commits
On Fri, Aug 17, 2018 at 8:49 AM, Marshall Clow wrote: > On Thu, Aug 16, 2018 at 3:30 PM, Vitaly Buka > wrote: > >> This brakes some bots >> http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux- >> fast/builds/22441 >> >> /b/sanitizer-x86_64-linux-fast/build/libcxx_build_msan/include/c++/v1/a

[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.

2018-08-17 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdLSPServer.cpp:80 + if (NormalizedID.front() == '"') +NormalizedID = NormalizedID.substr(1, NormalizedID.size() - 2); + return NormalizedID; This still misses string escaping issues. E.g. `"` will

[PATCH] D50904: [analyzer][UninitializedObjectChecker] Added documentation to the checker list

2018-08-17 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: www/analyzer/alpha_checks.html:334-336 +The checker regards inherited fields as direct fields, so one +will recieve warnings for uninitialized inherited data members +as well. This statement has been debated for a whi

[libcxx] r340045 - Recommit r339943 - Establish the header. NFC yet. Reviewed as https://reviews.llvm.org/D50815 - with a fix for the sanitizer bots

2018-08-17 Thread Marshall Clow via cfe-commits
Author: marshall Date: Fri Aug 17 09:07:48 2018 New Revision: 340045 URL: http://llvm.org/viewvc/llvm-project?rev=340045&view=rev Log: Recommit r339943 - Establish the header. NFC yet. Reviewed as https://reviews.llvm.org/D50815 - with a fix for the sanitizer bots Added: libcxx/trunk/includ

[PATCH] D50845: [CUDA/OpenMP] Define only some host macros during device compilation

2018-08-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D50845#1204216, @Hahnfeld wrote: > In https://reviews.llvm.org/D50845#1204210, @ABataev wrote: > > > > Right, warning wasn't a good thought. We really want strict checking and > > > would have to error out when we find a function that wasn't i

[PATCH] D43783: [OpenCL] Remove block invoke function from emitted block literal struct

2018-08-17 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. Sorry for digging up an old commit... Apparently this broke block arguments, e.g. the following test case: int foo(int (^ bl)(void)) { return bl(); } int get21() { return foo(^{return 21;}); } int get42() { return foo(^{return 42;}); } In pa

[PATCH] D50250: [clang][ubsan] Implicit Conversion Sanitizer - integer sign change - clang part

2018-08-17 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri planned changes to this revision. lebedev.ri added a comment. Depends on https://reviews.llvm.org/D50901. (which should land first, ideally.) Repository: rC Clang https://reviews.llvm.org/D50250 ___ cfe-commits mailing list cfe-commits

[PATCH] D50845: [CUDA/OpenMP] Define only some host macros during device compilation

2018-08-17 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. In https://reviews.llvm.org/D50845#1204340, @ABataev wrote: > In https://reviews.llvm.org/D50845#1204216, @Hahnfeld wrote: > > > Got that, I agree on the conservative approach: If we find a function to be > > called that wasn't checked (because it wasn't implicitly `dec

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like keys

2018-08-17 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Checkers/PointerSortingChecker.cpp:72-76 + auto IteratesPointerKeysM = hasType(cxxRecordDecl(has( +fieldDecl(hasType(hasCanonicalType( + pointsTo(hasC

[PATCH] D50883: [clang-tidy] Handle unique owning smart pointers in ExprMutationAnalyzer

2018-08-17 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added a comment. In https://reviews.llvm.org/D50883#1203690, @JonasToth wrote: > I am suprised that this does not automatically follow from the general rules. > At the end, smartpointers cant do anything else then 'normal' classes. > > The `operator+/->` were not handled before? The mu

[PATCH] D50907: Make __shiftleft128 / __shiftright128 real compiler built-ins.

2018-08-17 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Forgot to add cfe-commits :-( Doing that now. https://reviews.llvm.org/D50907 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50652: [libcxx] By default, do not use internal_linkage to hide symbols from the ABI

2018-08-17 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In https://reviews.llvm.org/D50652#1202524, @hans wrote: > Thanks! Merged to 7.0 in r339882. Now that this has been done, I guess we need to document somewhere in the release notes that the default contract given by libc++ is changing in LLVM 7, right? Repository:

[PATCH] D50907: Make __shiftleft128 / __shiftright128 real compiler built-ins.

2018-08-17 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D50907 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

r340048 - Make __shiftleft128 / __shiftright128 real compiler built-ins.

2018-08-17 Thread Nico Weber via cfe-commits
Author: nico Date: Fri Aug 17 10:19:06 2018 New Revision: 340048 URL: http://llvm.org/viewvc/llvm-project?rev=340048&view=rev Log: Make __shiftleft128 / __shiftright128 real compiler built-ins. r337619 added __shiftleft128 / __shiftright128 as functions in intrin.h. Microsoft's STL plans on using

[PATCH] D50907: Make __shiftleft128 / __shiftright128 real compiler built-ins.

2018-08-17 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. r340048, thanks! https://reviews.llvm.org/D50907 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50876: Clean up newly created header

2018-08-17 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 161284. mclow.lists added a comment. Clean up the windows code a bit - though I don't think is used - since I don't think it will compile. https://reviews.llvm.org/D50876 Files: include/__bit_reference include/bit Index: include/bit ==

[PATCH] D50876: Clean up newly created header

2018-08-17 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/bit:96 #if defined(_LIBCPP_HAS_BITSCAN64) (defined(_M_AMD64) || defined(__x86_64__)) + if (_BitScanForward64(&__where, __x)) I'm not sure this code is ever used - since how can this compile? https://

[libcxx] r340049 - Refactor the newly created header. Still (almost) NFC. Reviewed as https://reviews.llvm.org/D50876

2018-08-17 Thread Marshall Clow via cfe-commits
Author: marshall Date: Fri Aug 17 10:27:25 2018 New Revision: 340049 URL: http://llvm.org/viewvc/llvm-project?rev=340049&view=rev Log: Refactor the newly created header. Still (almost) NFC. Reviewed as https://reviews.llvm.org/D50876 Modified: libcxx/trunk/include/__bit_reference libcxx

[PATCH] D50876: Clean up newly created header

2018-08-17 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: include/bit:140 static_assert(sizeof(unsigned) == 4, ""); return __popcnt(__x); } MSVC blindly uses the popcnt instruction whenever it sees this intrinsic. So this only works on Nehalem and newer Intel CPUs.

[PATCH] D50747: [analyzer] Drop support for GC mode in RetainCountChecker

2018-08-17 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. Yay. Repository: rC Clang https://reviews.llvm.org/D50747 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

[PATCH] D50596: [HIP] Make __hip_gpubin_handle hidden to avoid being merged across different shared libraries

2018-08-17 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC340056: [HIP] Make __hip_gpubin_handle hidden to avoid being merged across different… (authored by yaxunl, committed by ). Repository: rC Clang https://reviews.llvm.org/D50596 Files: lib/CodeGen/CGC

r340056 - [HIP] Make __hip_gpubin_handle hidden to avoid being merged across different shared libraries

2018-08-17 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri Aug 17 10:47:31 2018 New Revision: 340056 URL: http://llvm.org/viewvc/llvm-project?rev=340056&view=rev Log: [HIP] Make __hip_gpubin_handle hidden to avoid being merged across different shared libraries Different shared libraries contain different fat binary, which is sto

[PATCH] D50896: [clangd] Add xrefs LSP boilerplate implementation.

2018-08-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D50896#1204310, @ilya-biryukov wrote: > This change LG, but I would not commit it before we have an actual > implementation. > As soon as we have the `references` function in `ClangdUnit.cpp` > implemented, the merge of this change should be

[PATCH] D50389: [clang-tidy] Abseil: integral division of Duration check

2018-08-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Somehow documentation file was not committed. https://reviews.llvm.org/D50389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50876: Clean up newly created header

2018-08-17 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. @craig.topper - that's existing code; I'm not changing it. If we have a test bot that I can test this against, I'm happy to update it. https://reviews.llvm.org/D50876 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D49462: [ObjC] Error out when using forward-declared protocol in a @protocol expression

2018-08-17 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: test/CodeGenObjC/forward-declare-protocol-gnu.m:6 -Protocol *getProtocol(void) -{ - return @protocol(P); -} +@interface I +@end rjmccall wrote: > arphaman wrote: > > rjmccall wrote: > > > Does this real

[PATCH] D50876: Clean up newly created header

2018-08-17 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In https://reviews.llvm.org/D50876#1204531, @mclow.lists wrote: > @craig.topper - that's existing code; I'm not changing it. > If we have a test bot that I can test this against, I'm happy to update it. I'm not really sure that this code is actually used anywhere.

[PATCH] D50877: [MS] Mangle a hash of the main file path into anonymous namespaces

2018-08-17 Thread Reid Kleckner via Phabricator via cfe-commits
rnk updated this revision to Diff 161293. rnk added a comment. - Use xxHash64 https://reviews.llvm.org/D50877 Files: clang/lib/AST/MicrosoftMangle.cpp clang/test/CodeGenCXX/cfi-cross-dso.cpp clang/test/CodeGenCXX/cfi-icall.cpp clang/test/CodeGenCXX/debug-info-thunk.cpp clang/test/Code

[PATCH] D50896: [clangd] Add xrefs LSP boilerplate implementation.

2018-08-17 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Having unimplemented stubs in the codebase creates some confusion, but that's my personal opinion. Not terribly opposed to that if others feel it's the right way to go. For experiments, we could simply patch this in locally without committing upstream. With git i

[PATCH] D50877: [MS] Mangle a hash of the main file path into anonymous namespaces

2018-08-17 Thread Reid Kleckner via Phabricator via cfe-commits
rnk marked an inline comment as done. rnk added a comment. Exactly, this makes our names match MSVC more closely. Their hash depends on the path to the main source file. It doesn't care if the file is in a header. However, they use the absolute path to the file instead of the (probably relative

[PATCH] D47757: [Sema] Produce diagnostics when unavailable aligned allocation/deallocation functions are called

2018-08-17 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. @tra and @rsmith: Can we move forward and fix the incorrect cuda diagnostics in a separate patch? Repository: rC Clang https://reviews.llvm.org/D47757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

[PATCH] D50907: Make __shiftleft128 / __shiftright128 real compiler built-ins.

2018-08-17 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. lgtm https://reviews.llvm.org/D50907 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50892: [analyzer][UninitializedObjectChecker] Correct dynamic type is acquired for record pointees

2018-08-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp:187-191 // If FR is a pointer pointing to a non-primitive type. if (Optional RecordV = DerefdV.getAs()) { const TypedValueRegion *R = RecordV->

[PATCH] D47757: [Sema] Produce diagnostics when unavailable aligned allocation/deallocation functions are called

2018-08-17 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In https://reviews.llvm.org/D47757#1204545, @ahatanak wrote: > @tra and @rsmith: Can we move forward and fix the incorrect cuda diagnostics > in a separate patch? Doing that in a separate patch is OK, provided that that patch will be committed along with this one. It's a

[PATCH] D50896: [clangd] Add xrefs LSP boilerplate implementation.

2018-08-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Agreed with Ilya. I'd probably also make this depend on the ongoing implementation, as exposing LSP endpoints without proper implementation might be confusing to clangd users who only look at the the LSP endpoints. Users need to dig two levels of abstraction to find out

[PATCH] D50904: [analyzer][UninitializedObjectChecker] Added documentation to the checker list

2018-08-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added inline comments. This revision is now accepted and ready to land. Comment at: www/analyzer/alpha_checks.html:334-336 +The checker regards inherited fields as direct fields, so one +will recieve warnings for uninitialized inherited data member

[PATCH] D50905: [analyzer][UninitializedObjectChecker][WIP] Explicit namespace resolution for inherited data members

2018-08-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added inline comments. This revision is now accepted and ready to land. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp:114-115 + virtual void printNode(llvm::raw_ostream &Out) const override { +Out

[PATCH] D50509: [analyzer][UninitializedObjectChecker] Refactoring p6.: Move dereferencing to a function

2018-08-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp:223 + // int*). + while (auto Tmp = V.getAs()) { +// We can't reason about symbolic regions, assume its initialized. Hmm, i still have concerns

[PATCH] D50509: [analyzer][UninitializedObjectChecker] Refactoring p6.: Move dereferencing to a function

2018-08-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. Which shouldn't prevent us from moving code around. https://reviews.llvm.org/D50509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49462: [ObjC] Error out when using forward-declared protocol in a @protocol expression

2018-08-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:6788 + "emitting protocol metadata without definition"); + PD = PD->getDefinition(); What happens in the `@implementation` case (the one that we're not diagnosing yet) when the prot

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-08-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 161298. leonardchan marked 4 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D50616 Files: include/clang/AST/OperationKinds.def include/clang/AST/Type.h include/clang/Basic/DiagnosticCommonKinds.td lib/AST/Expr.cpp lib/

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-08-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In https://reviews.llvm.org/D50616#1203692, @ebevhan wrote: > In https://reviews.llvm.org/D50616#1203446, @leonardchan wrote: > > > Sorry I forgot to address this also. Just to make sure I understand this > > correctly since I haven't used these before: target hooks

[PATCH] D41727: [libcxx] Disable tautological-type-limit-compare warning

2018-08-17 Thread Brian Cain via Phabricator via cfe-commits
bcain abandoned this revision. bcain added a comment. Herald added subscribers: ldionne, christof. I think this is now obsolete due to clang changing the warning. Repository: rCXX libc++ https://reviews.llvm.org/D41727 ___ cfe-commits mailing lis

r340074 - Improve diagnostic for missing comma in template parameter list.

2018-08-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Aug 17 12:43:40 2018 New Revision: 340074 URL: http://llvm.org/viewvc/llvm-project?rev=340074&view=rev Log: Improve diagnostic for missing comma in template parameter list. Given 'typename T typename U', we would correctly diagnose the missing comma, but incorrectly disam

[PATCH] D50877: [MS] Mangle a hash of the main file path into anonymous namespaces

2018-08-17 Thread Nico Weber via Phabricator via cfe-commits
thakis accepted this revision. thakis added a comment. This revision is now accepted and ready to land. Can you explicitly mention that this intentionally doesn't use an absolute path in MicrosoftMangleContextImpl() or similar? https://reviews.llvm.org/D50877

[clang-tools-extra] r340075 - [clang-tidy] Add missing check documentation.

2018-08-17 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Aug 17 12:50:22 2018 New Revision: 340075 URL: http://llvm.org/viewvc/llvm-project?rev=340075&view=rev Log: [clang-tidy] Add missing check documentation. Added: clang-tools-extra/trunk/docs/clang-tidy/checks/abseil-duration-division.rst Added: clang-tools-extra/trun

[PATCH] D50904: [analyzer][UninitializedObjectChecker] Added documentation to the checker list

2018-08-17 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: www/analyzer/alpha_checks.html:334-336 +The checker regards inherited fields as direct fields, so one +will recieve warnings for uninitialized inherited data members +as well. NoQ wrote: > Szelethus wrote: > > This st

[PATCH] D49462: [ObjC] Error out when using forward-declared protocol in a @protocol expression

2018-08-17 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:6788 + "emitting protocol metadata without definition"); + PD = PD->getDefinition(); rjmccall wrote: > What happens in the `@implementation` case (the one that we're not diagnosing

[PATCH] D50389: [clang-tidy] Abseil: integral division of Duration check

2018-08-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D50389#1204514, @Eugene.Zelenko wrote: > Somehow documentation file was not committed. Oops, I forgot to `git add` to the doc file. `arc patch` somehow failed to apply this patch, I applied it manually. Added in https://reviews.llvm.org/rL34

[PATCH] D47757: [Sema] Produce diagnostics when unavailable aligned allocation/deallocation functions are called

2018-08-17 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D47757#1204561, @tra wrote: > It's a regression. There's a decent chance it breaks someone and this patch, > if committed by itself, will end up being rolled back. Is the regression you are referring to about the static function case? I don

[PATCH] D49462: [ObjC] Error out when using forward-declared protocol in a @protocol expression

2018-08-17 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. Comment at: lib/CodeGen/CGObjCMac.cpp:6788 + "emitting protocol metadata without definition"); + PD = PD->getDefinition(); arphaman wrot

[PATCH] D47757: [Sema] Produce diagnostics when unavailable aligned allocation/deallocation functions are called

2018-08-17 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In https://reviews.llvm.org/D47757#1204621, @ahatanak wrote: > In https://reviews.llvm.org/D47757#1204561, @tra wrote: > > > It's a regression. There's a decent chance it breaks someone and this > > patch, if committed by itself, will end up being rolled back. > > > Is the r

[PATCH] D50564: Add support for SEH unwinding on Windows.

2018-08-17 Thread Charles Davis via Phabricator via cfe-commits
cdavis5x added a comment. Ping. Repository: rUNW libunwind https://reviews.llvm.org/D50564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50413: [libunwind][include] Add some missing definitions to .

2018-08-17 Thread Charles Davis via Phabricator via cfe-commits
cdavis5x added a comment. Ping. Repository: rUNW libunwind https://reviews.llvm.org/D50413 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like keys

2018-08-17 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In https://reviews.llvm.org/D50488#1203876, @Szelethus wrote: > I think testcases for non-class iterator objects would be valuable. Thanks @Szelethus. Yes, as you correctly pointed out this would not match non-class iterator objects. This is my first time with ASTMatch

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-08-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. >> Has anyone actually asked LLVM whether they would accept fixed-point types >> into IR? I'm just a frontend guy, but it seems to me that there are >> advantages to directly representing these operations in a portable way even >> if there are no in-tree targets provi

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like keys

2018-08-17 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added inline comments. Comment at: lib/StaticAnalyzer/Checkers/PointerSortingChecker.cpp:72-76 + auto IteratesPointerKeysM = hasType(cxxRecordDecl(has( +fieldDecl(hasType(hasCanonicalType( + pointsTo(hasCano

[PATCH] D50862: [clang-tidy] Abseil: faster strsplit delimiter check

2018-08-17 Thread Deanna Garcia via Phabricator via cfe-commits
deannagarcia updated this revision to Diff 161309. deannagarcia marked 10 inline comments as done. https://reviews.llvm.org/D50862 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt clang-tidy/abseil/FasterStrsplitDelimiterCheck.cpp clang-tidy/abseil/FasterStrs

[PATCH] D50862: [clang-tidy] Abseil: faster strsplit delimiter check

2018-08-17 Thread Deanna Garcia via Phabricator via cfe-commits
deannagarcia added inline comments. Comment at: clang-tidy/abseil/FasterStrsplitDelimiterCheck.cpp:49 + // in the character literal. + if (Result == R"("'")") { +return std::string(R"('\'')"); JonasToth wrote: > The comment suggest, that all single quotes n

[PATCH] D50509: [analyzer][UninitializedObjectChecker] Refactoring p6.: Move dereferencing to a function

2018-08-17 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp:223 + // int*). + while (auto Tmp = V.getAs()) { +// We can't reason about symbolic regions, assume its initialized. NoQ wrote: > Hmm, i s

[PATCH] D50877: [MS] Mangle a hash of the main file path into anonymous namespaces

2018-08-17 Thread Reid Kleckner via Phabricator via cfe-commits
rnk updated this revision to Diff 161310. rnk marked an inline comment as done. rnk added a comment. - improve comment https://reviews.llvm.org/D50877 Files: clang/lib/AST/MicrosoftMangle.cpp clang/test/CodeGenCXX/cfi-cross-dso.cpp clang/test/CodeGenCXX/cfi-icall.cpp clang/test/CodeGenC

[PATCH] D50509: [analyzer][UninitializedObjectChecker] Refactoring p6.: Move dereferencing to a function

2018-08-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp:223 + // int*). + while (auto Tmp = V.getAs()) { +// We can't reason about symbolic regions, assume its initialized. Szelethus wrote: > NoQ wrot

[PATCH] D40925: Add option -fkeep-static-consts

2018-08-17 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews updated this revision to Diff 161307. eandrews edited the summary of this revision. eandrews added a comment. This patch fell through the cracks earlier. I apologize. Based on Reid's and Erich's feedback, I am now adding the variable to @llvm.used. Additionally I modified the if stateme

[PATCH] D50877: [MS] Mangle a hash of the main file path into anonymous namespaces

2018-08-17 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D50877#1204609, @thakis wrote: > Can you explicitly mention that this intentionally doesn't use an absolute > path in MicrosoftMangleContextImpl() or similar? Sure. I also described the issue with codeview that motivates why we want unique name

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-08-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D50616#1203772, @lebedev.ri wrote: > In https://reviews.llvm.org/D50616#1203751, @rjmccall wrote: > > > In https://reviews.llvm.org/D50616#1203692, @ebevhan wrote: > > > > > > > > > > > Has anyone actually asked LLVM whether they would accept

r340079 - [MS] Mangle a hash of the main file path into anonymous namespaces

2018-08-17 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Aug 17 13:59:27 2018 New Revision: 340079 URL: http://llvm.org/viewvc/llvm-project?rev=340079&view=rev Log: [MS] Mangle a hash of the main file path into anonymous namespaces Summary: This is needed to avoid conflicts in mangled names for codeview types in anonymous namespac

[PATCH] D50877: [MS] Mangle a hash of the main file path into anonymous namespaces

2018-08-17 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC340079: [MS] Mangle a hash of the main file path into anonymous namespaces (authored by rnk, committed by ). Changed prior to commit: https://reviews.llvm.org/D50877?vs=161310&id=161323#toc Repository:

r340080 - Update comments in CGDebugInfo to reflect changes in the MS mangler, NFC

2018-08-17 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Aug 17 13:59:52 2018 New Revision: 340080 URL: http://llvm.org/viewvc/llvm-project?rev=340080&view=rev Log: Update comments in CGDebugInfo to reflect changes in the MS mangler, NFC I've tried to elaborate on the purpose of these type identifiers and why and when clang uses t

[PATCH] D50924: [CodeGen] add rotate builtins

2018-08-17 Thread Sanjay Patel via Phabricator via cfe-commits
spatel created this revision. spatel added reviewers: fabiang, craig.topper, rnk, thakis. Herald added a subscriber: mcrosier. This exposes the LLVM funnel shift intrinsics as more familiar bit rotation functions in clang (when both halves of a funnel shift are the same value, it's a rotate). I

[PATCH] D47757: [Sema] Produce diagnostics when unavailable aligned allocation/deallocation functions are called

2018-08-17 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. The code you showed does compile with or without `-fcuda-is-device` after applying my patch. Repository: rC Clang https://reviews.llvm.org/D47757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm

[PATCH] D50924: [CodeGen] add rotate builtins

2018-08-17 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Do you mind updating the _rotl* and _rotr* intrinsics to use the same codegen? They're right above in the switch. https://reviews.llvm.org/D50924 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

[PATCH] D50924: [CodeGen] add rotate builtins

2018-08-17 Thread Sanjay Patel via Phabricator via cfe-commits
spatel updated this revision to Diff 161325. spatel added a comment. Patch updated: Fixed a docs typo. https://reviews.llvm.org/D50924 Files: docs/LanguageExtensions.rst include/clang/Basic/Builtins.def lib/CodeGen/CGBuiltin.cpp test/CodeGen/builtin-rotate.c Index: test/CodeGen/builtin

[PATCH] D50924: [CodeGen] add rotate builtins

2018-08-17 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added a comment. In https://reviews.llvm.org/D50924#1204772, @rnk wrote: > Do you mind updating the _rotl* and _rotr* intrinsics to use the same > codegen? They're right above in the switch. Sure - I didn't know about those. https://reviews.llvm.org/D50924 _

<    1   2   3   >