[libclc] r325867 - utils: Adapt to llvm r325155

2018-02-22 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Thu Feb 22 23:37:03 2018 New Revision: 325867 URL: http://llvm.org/viewvc/llvm-project?rev=325867&view=rev Log: utils: Adapt to llvm r325155 r325155 ("Pass a reference to a module to the bitcode writer.") changed bit writer interface from pointer to reference Reviewer: Aaro

[libclc] r325866 - amdgcn: Fix build after GDS/const AS swap in r325030

2018-02-22 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Thu Feb 22 23:37:01 2018 New Revision: 325866 URL: http://llvm.org/viewvc/llvm-project?rev=325866&view=rev Log: amdgcn: Fix build after GDS/const AS swap in r325030 Acked-by: Aaron Watry Signed-off-by: Jan Vesely Added: libclc/trunk/amdgcn-amdhsa/lib/OVERRIDES_4.0

[libclc] r325865 - amdgcn: Fix datalayout after addition of 32bit const AS in r324747

2018-02-22 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Thu Feb 22 23:36:54 2018 New Revision: 325865 URL: http://llvm.org/viewvc/llvm-project?rev=325865&view=rev Log: amdgcn: Fix datalayout after addition of 32bit const AS in r324747 Acked-by: Aaron Watry Signed-off-by: Jan Vesely Modified: libclc/trunk/amdgcn/lib/cl_khr_

[libclc] r325864 - r600: Fix datalayout after clang r324101

2018-02-22 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Thu Feb 22 23:36:51 2018 New Revision: 325864 URL: http://llvm.org/viewvc/llvm-project?rev=325864&view=rev Log: r600: Fix datalayout after clang r324101 r324101 switched around AS numbering Acked-by: Aaron Watry Signed-off-by: Jan Vesely Added: libclc/trunk/r600/lib/

[libclc] r325863 - amdgcn: Fix datalayout after clang r324101

2018-02-22 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Thu Feb 22 23:36:39 2018 New Revision: 325863 URL: http://llvm.org/viewvc/llvm-project?rev=325863&view=rev Log: amdgcn: Fix datalayout after clang r324101 r324101 switched around AS numbering Acked-by: Aaron Watry Signed-off-by: Jan Vesely Added: libclc/trunk/amdgcn/

[PATCH] D43581: [clang-tidy/google] Improve the Objective-C global variable declaration check πŸ”§

2018-02-22 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore marked an inline comment as not done. stephanemoore added inline comments. Comment at: test/clang-tidy/google-objc-global-variable-declaration.m:33 static NSString* const kGood = @"hello"; +static NSString* const XYGood = @"hello"; static NSString* gMyIntGood = 0;

[PATCH] D43581: [clang-tidy/google] Improve the Objective-C global variable declaration check πŸ”§

2018-02-22 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added inline comments. Comment at: clang-tidy/google/GlobalVariableDeclarationCheck.cpp:92 + "an appropriate prefix (see " + "http://google.github.io/styleguide/objcguide#constants).") << Decl->getName() << generateFixItHint(Decl, true); ---

[PATCH] D43581: [clang-tidy/google] Improve the Objective-C global variable declaration check πŸ”§

2018-02-22 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 135595. stephanemoore marked 2 inline comments as done. stephanemoore retitled this revision from "[clang-tidy/google] Fix the Objective-C global variable declaration check πŸ”§" to "[clang-tidy/google] Improve the Objective-C global variable declaration c

[PATCH] D43621: [Driver] Allow using a canonical form of '-fuse-ld=' when cross-compiling on Windows.

2018-02-22 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. > That's weird, because lots of lldb tests compile and link test binaries on > Windows with `-fuse-ld=lld` (without the `.exe`). What makes you say the > `.exe` is necessary? Maybe he is using clang (not clang-cl) and want to use ld.lld.exe instead of lld-link? Reposit

[PATCH] D43497: [analyzer] Introduce correct lifetime extension behavior in simple cases.

2018-02-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > Add a FIXME test case that demonstrates that automatic destructors don't fire > after lifetime extension through a POD field, even though lifetime extension > itself seems to work correctly. This has always been broken - the CFG element for the automatic destructor is si

[PATCH] D42645: New simple Checker for mmap calls

2018-02-22 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. Thank you! I'll try to commit again. https://reviews.llvm.org/D42645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[PATCH] D43424: [clang-doc] Implement a (simple) Markdown generator

2018-02-22 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 135583. juliehockett added a comment. Updating based on parent revision changes -- still rough, will continue to improve. https://reviews.llvm.org/D43424 Files: clang-doc/generators/CMakeLists.txt clang-doc/generators/Generators.h clang-doc/gene

[PATCH] D43667: [clang-doc] Implement a YAML generator

2018-02-22 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett created this revision. juliehockett added reviewers: klimek, jakehehrlich, sammccall, lebedev.ri. juliehockett added a project: clang-tools-extra. Herald added a subscriber: mgorny. juliehockett added a dependency: D43341: [clang-doc] Implement reducer portion of the frontend framewor

[PATCH] D43666: [analyzer] When constructing a temporary without construction context, track it for destruction anyway.

2018-02-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet. Herald added subscribers: cfe-commits, rnkovacs. This brings back code that was doing so earlier (when we had no constructed contexts at all) but was removed too early in https://reviews.llv

r325854 - Add a test to ensure we don't permit mutable access on temporaries outside the evaluation in which they were created.

2018-02-22 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Feb 22 18:03:26 2018 New Revision: 325854 URL: http://llvm.org/viewvc/llvm-project?rev=325854&view=rev Log: Add a test to ensure we don't permit mutable access on temporaries outside the evaluation in which they were created. Modified: cfe/trunk/test/SemaCXX/constant

[PATCH] D43663: [NFC] Move CommentOpts checks to the call sites that depend on it.

2018-02-22 Thread David L. Jones via Phabricator via cfe-commits
dlj created this revision. dlj added a reviewer: rsmith. Herald added a subscriber: sanjoy. When parsing comments, for example, for -Wdocumentation, slightly different behaviour occurs when -fparse-all-comments is specified. However, these differences are subtle: 1. All comments are saved during

[PATCH] D43659: [analyzer] Don't crash when dynamic type of a concrete region is hard-set with placement new.

2018-02-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > In this case, could we emit a warning? If not from CallEvent, then from where? (1) This might result in a buffer overflow, so i home that `alpha.ArrayBound` may eventually catch it. (2) It might be a good idea to make a fairly generic checker for the strict aliasing rule.

r325850 - [Darwin] Add a test to check clang produces accelerator tables.

2018-02-22 Thread Davide Italiano via cfe-commits
Author: davide Date: Thu Feb 22 17:25:03 2018 New Revision: 325850 URL: http://llvm.org/viewvc/llvm-project?rev=325850&view=rev Log: [Darwin] Add a test to check clang produces accelerator tables. This test was previously in lldb, and was only checking that clang was emitting the correct section.

[PATCH] D43659: [analyzer] Don't crash when dynamic type of a concrete region is hard-set with placement new.

2018-02-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/CallEvent.cpp:593 +// Fall back to a generic pointer cast for this-value. +const CXXMethodDecl *StaticMD = cast(getDecl()); +const CXXRecordDecl *StaticClass = StaticMD->getParent(); --

[PATCH] D43659: [analyzer] Don't crash when dynamic type of a concrete region is hard-set with placement new.

2018-02-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 135572. NoQ added a comment. - Add a definitely-not-UB example (`char` buffers are special). - Bring back an accidentally deleted blank line. https://reviews.llvm.org/D43659 Files: lib/StaticAnalyzer/Core/CallEvent.cpp test/Analysis/new-dynamic-types.cpp

[PATCH] D43659: [analyzer] Don't crash when dynamic type of a concrete region is hard-set with placement new.

2018-02-22 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added a comment. This revision is now accepted and ready to land. LGTM, though in general I still think we should do something on soft-failure-modes in order to aid future debugging... Is the failure mode in this case always a UB? In this

[PATCH] D43660: [OpenMP] Add OpenMP data sharing infrastructure using global memory

2018-02-22 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. gtbercea added reviewers: ABataev, carlo.bertolli, caomhin, hfinkel, Hahnfeld. Herald added subscribers: cfe-commits, guansong, jholewinski. This patch handles the Clang code generation phase for the OpenMP data sharing infrastructure. TODO: add a more detailed de

[PATCH] D43659: [analyzer] Don't crash when dynamic type of a concrete region is hard-set with placement new.

2018-02-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet. Herald added subscribers: cfe-commits, rnkovacs. This is assertion removal that i find valid. With placement new (which isn't even need to be inlined, we used to model it conservatively well

Re: [PATCH] D43514: Start settinng dso_local for COFF

2018-02-22 Thread Eric Christopher via cfe-commits
On Thu, Feb 22, 2018 at 4:40 PM Rafael Avila de Espindola via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Eric Christopher via Phabricator writes: > > > echristo added inline comments. > > > > > > > > Comment at: lib/CodeGen/CodeGenModule.h:728 > > + /// This must be call

[PATCH] D43657: [analyzer] dump() dynamic type info and taint into state dumps.

2018-02-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet. Herald added subscribers: cfe-commits, rnkovacs. More dumps! Eg.: Dynamic types of regions: x : class PR13569_virtual::Child Taint dumps were already implemented, so i added them becau

Re: [PATCH] D43514: Start settinng dso_local for COFF

2018-02-22 Thread Rafael Avila de Espindola via cfe-commits
Eric Christopher via Phabricator writes: > echristo added inline comments. > > > > Comment at: lib/CodeGen/CodeGenModule.h:728 > + /// This must be called after dllimport/dllexport is set. > + /// FIXME: should this set dllimport/dllexport instead? >void setGVProperties(llv

[PATCH] D41102: Setup clang-doc frontend framework

2018-02-22 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 135559. juliehockett marked 10 inline comments as done. juliehockett added a comment. Refactoring bitcode writer https://reviews.llvm.org/D41102 Files: CMakeLists.txt clang-doc/BitcodeWriter.cpp clang-doc/BitcodeWriter.h clang-doc/CMakeLists.tx

[PATCH] D43362: Simplify setting dso_local. NFC.

2018-02-22 Thread Rafael Avila de Espindola via Phabricator via cfe-commits
espindola closed this revision. espindola added a comment. r325846 https://reviews.llvm.org/D43362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43514: Start settinng dso_local for COFF

2018-02-22 Thread Eric Christopher via Phabricator via cfe-commits
echristo added inline comments. Comment at: lib/CodeGen/CodeGenModule.h:728 + /// This must be called after dllimport/dllexport is set. + /// FIXME: should this set dllimport/dllexport instead? void setGVProperties(llvm::GlobalValue *GV, const NamedDecl *D) const; --

r325846 - Simplify setting dso_local. NFC.

2018-02-22 Thread Rafael Espindola via cfe-commits
Author: rafael Date: Thu Feb 22 16:22:15 2018 New Revision: 325846 URL: http://llvm.org/viewvc/llvm-project?rev=325846&view=rev Log: Simplify setting dso_local. NFC. The value of dso_local can be computed from just IR properties and global information (object file type, command line options, etc)

[PATCH] D43105: [RISCV] Enable __int128_t and __uint128_t through clang flag

2018-02-22 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 135553. Repository: rC Clang https://reviews.llvm.org/D43105 Files: include/clang/Basic/TargetInfo.h include/clang/Basic/TargetOptions.h include/clang/Driver/Options.td lib/Basic/Targets/Mips.h lib/Driver/ToolChains/Clang.cpp lib/Frontend/Compil

[PATCH] D43514: Start settinng dso_local for COFF

2018-02-22 Thread Rafael Avila de Espindola via Phabricator via cfe-commits
espindola updated this revision to Diff 135547. espindola added a comment. Address review comments. https://reviews.llvm.org/D43514 Files: lib/CodeGen/CGDecl.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/CodeGen/ItaniumCXXABI.cpp test/CodeGen/aarch64-varargs-ms.c

[PATCH] D43105: [RISCV] Enable __int128_t and __uint128_t through clang flag

2018-02-22 Thread Alex Bradbury via Phabricator via cfe-commits
asb added inline comments. Comment at: test/CodeGen/riscv32-abi.c:2-3 // RUN: %clang_cc1 -triple riscv32 -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple riscv32 -emit-llvm -fforce-enable-int128 %s -o - \ +// RUN: | FileCheck %s -check-prefix=CHECK-FORCEINT128 ---

[PATCH] D43650: [ARM] Add ARMv8.2-A FP16 vector intrinsics

2018-02-22 Thread Abderrazek Zaafrani via Phabricator via cfe-commits
az created this revision. az added a reviewer: SjoerdMeijer. Herald added subscribers: kristof.beyls, javed.absar. This patch adds the fp16 neon vector intrinsic for ARM as described in the ARM ACLE document. While this patch may seem large at first but it is essentially a modification/addition

[PATCH] D43105: [RISCV] Enable __int128_t and __uint128_t through clang flag

2018-02-22 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 135540. mgrang added a comment. Thanks @asb. I have addressed your comments. Repository: rC Clang https://reviews.llvm.org/D43105 Files: include/clang/Basic/TargetInfo.h include/clang/Basic/TargetOptions.h include/clang/Driver/Options.td lib/Basic

[PATCH] D43648: [clangd] Debounce streams of updates.

2018-02-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, ioeric, jkorous-apple, klimek. Don't actually start building ASTs for new revisions until either: - 500ms have passed since the last revision, or - we actually need the revisi

[PATCH] D43514: Start settinng dso_local for COFF

2018-02-22 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. Some inline comments - I think this looks ok in general, but I'm curious about the answers to the questions/documentation bits inline. Thanks! Comment at: lib/CodeGen/CGDecl.cpp:257 + setGVProperties(GV, &D); + If positioning is i

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-02-22 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D43576#1016561, @majnemer wrote: > Here's my thinking: the `__uuidof` expression literally declares a variable > called `_GUID_ddb47a6a_0f23_11d5_9109_00e0296b75d3` of type `__s_GUID` which > is why it behaves the way it does: https://godbolt.

[PATCH] D43362: Simplify setting dso_local. NFC.

2018-02-22 Thread Eric Christopher via Phabricator via cfe-commits
echristo accepted this revision. echristo added a comment. This revision is now accepted and ready to land. LGTM. Thanks for the cleanup. https://reviews.llvm.org/D43362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D43105: [RISCV] Enable __int128_t and __uint128_t through clang flag

2018-02-22 Thread Alex Bradbury via Phabricator via cfe-commits
asb accepted this revision. asb added a comment. I've added two suggestions on further tweaking the tests which I think it would be worth adopting. Looks good to me. Comment at: test/CodeGen/riscv32-abi.c:424-430 + +// RUN: %clang_cc1 -triple riscv32 -fforce-enable-int128 \ +/

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-02-22 Thread David Majnemer via Phabricator via cfe-commits
majnemer added a comment. In https://reviews.llvm.org/D43576#1016512, @rsmith wrote: > Do we need to also track whether the argument is a pointer or reference to a > UUID (and also the cv-qualifiers)? For the `Declaration` case, we track this > by tracking the corresponding parameter type; the

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-02-22 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 135520. juliehockett added a comment. Updating for parent diff changes https://reviews.llvm.org/D43341 Files: clang-doc/BitcodeReader.cpp clang-doc/BitcodeReader.h clang-doc/BitcodeWriter.cpp clang-doc/BitcodeWriter.h clang-doc/CMakeLists.txt

[PATCH] D41102: Setup clang-doc frontend framework

2018-02-22 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. An idea on how to further generalize/cleanup `emitBlockInfoBlock()`. While *i think* will help, i'm not sure how to further consolidate the `BlockIdNameMap`/`RecordIdNameMap` and the actual `emitBlock(*)`... Comment at: clang-doc/BitcodeWriter.cpp:

r325834 - [Sema] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2018-02-22 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Thu Feb 22 14:35:17 2018 New Revision: 325834 URL: http://llvm.org/viewvc/llvm-project?rev=325834&view=rev Log: [Sema] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). Modified: cfe/trunk/include/clang/Sema/Scope.h cfe/

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-02-22 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Do we need to also track whether the argument is a pointer or reference to a UUID (and also the cv-qualifiers)? For the `Declaration` case, we track this by tracking the corresponding parameter type; the same thing would presumably work here. In https://reviews.llvm.org

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-02-22 Thread David Majnemer via Phabricator via cfe-commits
majnemer added a comment. In https://reviews.llvm.org/D43576#1016418, @zahiraam wrote: > In https://reviews.llvm.org/D43576#1016295, @majnemer wrote: > > > We should really, really avoid making this sort of change without first > > trying to desugar uuidof into a reference to a variable. That wo

[PATCH] D42776: [Sema] Fix an assertion failure in constant expression evaluation of calls to functions with default arguments

2018-02-22 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Thank you, this looks like a great direction. As noted, there are a bunch of other cases that we should cover with this approach. I'm really happy about the number of related bugs we get to fix with this change. Comment at: lib/AST/ExprConstant.cpp:31

[PATCH] D43581: [clang-tidy/google] Fix the Objective-C global variable declaration check πŸ”§

2018-02-22 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 135510. stephanemoore added a comment. Revert the inclusion of the link to the Google Objective-C style guide in the diagnostic message. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43581 Files: clang-tidy/google/GlobalVariableDe

Re: r324308 - Fix crash on invalid.

2018-02-22 Thread Richard Trieu via cfe-commits
Thanks, Hans! On Thu, Feb 22, 2018 at 3:27 AM, Hans Wennborg wrote: > Seems safe. Merged in r325766. > > On Thu, Feb 22, 2018 at 1:15 AM, Richard Trieu wrote: > > Hi Hans, > > > > If there's still time for rc3, I'd like to get this crash fix in. This > adds > > a null check to prevent a crash

[PATCH] D43581: [clang-tidy/google] Fix the Objective-C global variable declaration check πŸ”§

2018-02-22 Thread Yan Zhang via Phabricator via cfe-commits
Wizard added inline comments. Comment at: clang-tidy/google/GlobalVariableDeclarationCheck.cpp:92 + "an appropriate prefix (see " + "http://google.github.io/styleguide/objcguide#constants).") << Decl->getName() << generateFixItHint(Decl, true); --

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-02-22 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. In https://reviews.llvm.org/D43576#1016295, @majnemer wrote: > We should really, really avoid making this sort of change without first > trying to desugar uuidof into a reference to a variable. That would solve a > ton of problems, problems like this one. Not sure I

[PATCH] D42776: [Sema] Fix an assertion failure in constant expression evaluation of calls to functions with default arguments

2018-02-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. ping https://reviews.llvm.org/D42776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-02-22 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 135502. https://reviews.llvm.org/D43576 Files: test/CodeGenCXX/instantiate-uuid.cpp test/Sema/member-reference-dll.cpp Index: test/Sema/member-reference-dll.cpp === --- test/Sema/member-re

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-02-22 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. Adding test case. https://reviews.llvm.org/D43576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43581: [clang-tidy/google] Fix the Objective-C global variable declaration check πŸ”§

2018-02-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/google/GlobalVariableDeclarationCheck.cpp:92 + "an appropriate prefix (see " + "http://google.github.io/styleguide/objcguide#constants).") << Decl->getName() << generateFixItHint(Decl, true); ---

[PATCH] D43581: [clang-tidy/google] Fix the Objective-C global variable declaration check πŸ”§

2018-02-22 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. In https://reviews.llvm.org/D43581#1016327, @Wizard wrote: > In https://reviews.llvm.org/D43581#1016318, @stephanemoore wrote: > > > In https://reviews.llvm.org/D43581#1016300, @Wizard wrote: > > > > > Please update the warning info to indicate that prefix 'k' is no

[PATCH] D43581: [clang-tidy/google] Fix the Objective-C global variable declaration check πŸ”§

2018-02-22 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 135497. stephanemoore added a comment. Update the diagnostic information to link to the Google Objective-C style guide for guidance on an appropriate prefix. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43581 Files: clang-tidy/go

[PATCH] D34367: CodeGen: Fix address space of indirect function argument

2018-02-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 135499. yaxunl added a comment. sync to ToT. https://reviews.llvm.org/D34367 Files: lib/CodeGen/CGAtomic.cpp lib/CodeGen/CGCall.cpp lib/CodeGen/CGCall.h lib/CodeGen/CGClass.cpp lib/CodeGen/CGDecl.cpp lib/CodeGen/CGExprCXX.cpp lib/CodeGen/CGGPUB

[PATCH] D34367: CodeGen: Fix address space of indirect function argument

2018-02-22 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGCall.cpp:3446 + return LV.asAggregateRValue(); +} + No, I don't think this is right. This method should always return an independent RValue; if the CallArg is storing an LValue, it should copy from it

[PATCH] D41228: [ObjC] Enable __strong pointers in structs under ARC

2018-02-22 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/Type.h:1121 + /// after it is moved, as opposed to a truely destructive move in which the + /// source object is placed in an uninitialized state. + PrimitiveCopyKind isNonTrivialToPrimitiveDestructiveMove() const;

[PATCH] D43105: [RISCV] Enable __int128_t and __uint128_t through clang flag

2018-02-22 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Added tests for ABI lowering and preprocessor defines as per comments. Repository: rC Clang https://reviews.llvm.org/D43105 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D43105: [RISCV] Enable __int128_t and __uint128_t through clang flag

2018-02-22 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 135493. mgrang retitled this revision from "[RISCV] Enable __int128_t and uint128_t through clang flag" to "[RISCV] Enable __int128_t and __uint128_t through clang flag". mgrang edited the summary of this revision. Repository: rC Clang https://reviews.llvm

[PATCH] D43581: [clang-tidy/google] Fix the Objective-C global variable declaration check πŸ”§

2018-02-22 Thread Yan Zhang via Phabricator via cfe-commits
Wizard accepted this revision. Wizard added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D43581#1016318, @stephanemoore wrote: > In https://reviews.llvm.org/D43581#1016300, @Wizard wrote: > > > Please update the warning info to indicate that prefix 'k' i

[PATCH] D43513: [OpenMP] Limit reduction support for pragma 'distribute' when combined with pragma 'simd'

2018-02-22 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL325822: [OpenMP] Limit reduction support for pragma 'distribute' when combined with… (authored by cbertol, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://revie

r325822 - [OpenMP] Limit reduction support for pragma 'distribute' when combined with pragma 'simd'

2018-02-22 Thread Carlo Bertolli via cfe-commits
Author: cbertol Date: Thu Feb 22 11:38:14 2018 New Revision: 325822 URL: http://llvm.org/viewvc/llvm-project?rev=325822&view=rev Log: [OpenMP] Limit reduction support for pragma 'distribute' when combined with pragma 'simd' Differential Revision: https://reviews.llvm.org/D43513 This is a bug fi

[PATCH] D43640: add support for constants with appropriate prefix. Start with 'k' is not the only option. This is according to http://google.github.io/styleguide/objcguide.html#constants

2018-02-22 Thread Yan Zhang via Phabricator via cfe-commits
Wizard updated this revision to Diff 135485. Wizard added a comment. fix format Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43640 Files: clang-tidy/google/GlobalVariableDeclarationCheck.cpp test/clang-tidy/google-objc-global-variable-declaration.m Index: test/clang-tid

[PATCH] D43602: [CUDA] Added missing functions.

2018-02-22 Thread Artem Belevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC325814: [CUDA] Added missing functions. (authored by tra, committed by ). Changed prior to commit: https://reviews.llvm.org/D43602?vs=135348&id=135466#toc Repository: rC Clang https://reviews.llvm.o

[PATCH] D43533: [CFG] [analyzer] NFC: Refactor ConstructionContext into a finite set of cases.

2018-02-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: include/clang/Analysis/ConstructionContext.h:119 + static const ConstructionContext * + finalize(BumpVectorContext &C, const ConstructionContextLayer *TopLayer); + a.sidorin wrote: > Maybe just `build()`? For me, `finalize

[PATCH] D43581: [clang-tidy/google] Fix the Objective-C global variable declaration check πŸ”§

2018-02-22 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. In https://reviews.llvm.org/D43581#1016300, @Wizard wrote: > Please update the warning info to indicate that prefix 'k' is not the only > option for constants. Something like: > "const global variable '%0' must have an appropriate prefix or a name which > starts

[PATCH] D34367: CodeGen: Fix address space of indirect function argument

2018-02-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 135474. yaxunl added a comment. Revised by John's comments. https://reviews.llvm.org/D34367 Files: lib/CodeGen/CGAtomic.cpp lib/CodeGen/CGCall.cpp lib/CodeGen/CGCall.h lib/CodeGen/CGClass.cpp lib/CodeGen/CGDecl.cpp lib/CodeGen/CGExprCXX.cpp lib

[PATCH] D43533: [CFG] [analyzer] NFC: Refactor ConstructionContext into a finite set of cases.

2018-02-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 135480. NoQ added a comment. Address comments. https://reviews.llvm.org/D43533 Files: include/clang/Analysis/CFG.h include/clang/Analysis/ConstructionContext.h lib/Analysis/CFG.cpp lib/Analysis/CMakeLists.txt lib/Analysis/ConstructionContext.cpp lib

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-02-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. It seems to me that the test here is very much lacking. It doesn't seem to include the example you've mentioned, and has no validation to ensure that there is a single instantiation happening. I'd like to see what happens when a UUID is passed as a pack, how SFINAE

[PATCH] D43581: [clang-tidy/google] Fix the Objective-C global variable declaration check πŸ”§

2018-02-22 Thread Yan Zhang via Phabricator via cfe-commits
Wizard requested changes to this revision. Wizard added a comment. This revision now requires changes to proceed. Please update the warning info to indicate that prefix 'k' is not the only option for constants. Something like: "const global variable '%0' must have an appropriate prefix or a name

[PATCH] D43640: add support for constants with appropriate prefix. Start with 'k' is not the only option. This is according to http://google.github.io/styleguide/objcguide.html#constants

2018-02-22 Thread Yan Zhang via Phabricator via cfe-commits
Wizard added a comment. In https://reviews.llvm.org/D43640#1016287, @stephanemoore wrote: > I have this change out for review as well: > https://reviews.llvm.org/D43581 Ah cool. Your change looks good. Technically the same as mine. I will discard this diff. Repository: rCTE Clang Tools Ex

[PATCH] D43581: [clang-tidy/google] Fix the Objective-C global variable declaration check πŸ”§

2018-02-22 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 135489. stephanemoore added a comment. I forgot to update the diagnostic message per the change. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43581 Files: clang-tidy/google/GlobalVariableDeclarationCheck.cpp test/clang-tidy/goog

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-02-22 Thread David Majnemer via Phabricator via cfe-commits
majnemer added a comment. We should really, really avoid making this sort of change without first trying to desugar uuidof into a reference to a variable. That would solve a ton of problems, problems like this one. https://reviews.llvm.org/D43576

[PATCH] D43640: add support for constants with appropriate prefix. Start with 'k' is not the only option. This is according to http://google.github.io/styleguide/objcguide.html#constants

2018-02-22 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. I have this change out for review as well: https://reviews.llvm.org/D43581 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm

[PATCH] D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency

2018-02-22 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 135484. Quuxplusone added a reviewer: rsmith. Quuxplusone added a subscriber: Rakete. Quuxplusone added a comment. Eliminate a couple of `auto` per comment by @Rakete. Repository: rC Clang https://reviews.llvm.org/D43322 Files: include/clan

[PATCH] D43640: add support for constants with appropriate prefix. Start with 'k' is not the only option. This is according to http://google.github.io/styleguide/objcguide.html#constants

2018-02-22 Thread Yan Zhang via Phabricator via cfe-commits
Wizard created this revision. Herald added subscribers: cfe-commits, klimek. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43640 Files: clang-tidy/google/GlobalVariableDeclarationCheck.cpp test/clang-tidy/google-objc-global-variable-declaration.m Index: test/clang-tidy/goo

[PATCH] D41228: [ObjC] Enable __strong pointers in structs under ARC

2018-02-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: include/clang/AST/Type.h:1121 + /// after it is moved, as opposed to a truely destructive move in which the + /// source object is placed in an uninitialized state. + PrimitiveCopyKind isNonTrivialToPrimitiveDestructiveMove() const;

[PATCH] D43634: [clangd] Extend textDocument/didChange to specify whether diagnostics should be generated.

2018-02-22 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE325813: [clangd] Extend textDocument/didChange to specify whether diagnostics should be… (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D43634?vs=135463&id=1354

r325814 - [CUDA] Added missing functions.

2018-02-22 Thread Artem Belevich via cfe-commits
Author: tra Date: Thu Feb 22 10:40:52 2018 New Revision: 325814 URL: http://llvm.org/viewvc/llvm-project?rev=325814&view=rev Log: [CUDA] Added missing functions. Initial commit missed sincos(float), llabs() and few atomics that we used to pull in from device_functions.hpp, which we no longer incl

[clang-tools-extra] r325813 - [clangd] Extend textDocument/didChange to specify whether diagnostics should be generated.

2018-02-22 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Feb 22 10:40:39 2018 New Revision: 325813 URL: http://llvm.org/viewvc/llvm-project?rev=325813&view=rev Log: [clangd] Extend textDocument/didChange to specify whether diagnostics should be generated. Summary: This would allow us to disable diagnostics when didChange is ca

[PATCH] D43634: [clangd] Extend textDocument/didChange to specify whether diagnostics should be generated.

2018-02-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 135463. ioeric marked 2 inline comments as done. ioeric added a comment. Addressed review comments. Removed test. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43634 Files: clangd/ClangdLSPServer.cpp clangd/Protocol.cpp clangd/Protoco

r325812 - [OPENMP] Require valid SourceLocation in function call, NFC.

2018-02-22 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Feb 22 10:33:31 2018 New Revision: 325812 URL: http://llvm.org/viewvc/llvm-project?rev=325812&view=rev Log: [OPENMP] Require valid SourceLocation in function call, NFC. Removed default empty SourceLocation argument from `emitCall` function and require valid location. Mo

[PATCH] D43621: [Driver] Allow using a canonical form of '-fuse-ld=' when cross-compiling on Windows.

2018-02-22 Thread Adrian McCarthy via Phabricator via cfe-commits
amccarth added a comment. > Right now, we have to add an .exe suffix when using this switch, like > -fuse-ld=lld.exe. That's weird, because lots of lldb tests compile and link test binaries on Windows with `-fuse-ld=lld` (without the `.exe`). What makes you say the `.exe` is necessary? Repo

[PATCH] D43634: [clangd] Extend textDocument/didChange to specify whether diagnostics should be generated.

2018-02-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Nice, this will be useful for at least a couple of editor integrations. Comment at: clangd/Protocol.h:301 + + /// If this is not set, diagnostics will be generated fo

[PATCH] D43634: [clangd] Extend textDocument/didChange to specify whether diagnostics should be generated.

2018-02-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, jkorous-apple, ilya-biryukov, klimek. This would allow us to disable diagnostics when didChange is called but diagnostics are not wanted (e.g. code completion). Repository: rCTE Clang Tools

[PATCH] D41102: Setup clang-doc frontend framework

2018-02-22 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added inline comments. Comment at: clang-doc/BitcodeWriter.cpp:219 + +void ClangDocBitcodeWriter::emitIntRecord(int Value, RecordId ID) { + if (!Value) return; lebedev.ri wrote: > Now, all these three `emit*Record` functions now have the 'same signa

[PATCH] D41102: Setup clang-doc frontend framework

2018-02-22 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 135453. juliehockett marked 13 inline comments as done. juliehockett added a comment. Cleaning up bitcode writer https://reviews.llvm.org/D41102 Files: CMakeLists.txt clang-doc/BitcodeWriter.cpp clang-doc/BitcodeWriter.h clang-doc/CMakeLists.tx

[PATCH] D42366: [CodeGen] Fix generation of TBAA tags for may-alias accesses

2018-02-22 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D42366#1014546, @rjmccall wrote: > In https://reviews.llvm.org/D42366#1014157, @kosarev wrote: > > > I think zero would serve better as the unknown-size value. People who are > > not aware of TBAA internals would guess that since zero-sized ac

[PATCH] D43630: [Driver] Fix search paths on x32

2018-02-22 Thread James Clarke via Phabricator via cfe-commits
jrtc27 created this revision. Herald added a subscriber: cfe-commits. When targeting x32, the x32 libraries and headers should be used, not the x86_64 ones (which may not even be available), so prioritise those and use the right multiarch triple. Repository: rC Clang https://reviews.llvm.org/

[PATCH] D43628: [Sema][NFC] Split Function MultiVersioning decl semantic analysis into its own .cpp file.

2018-02-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: rnk, echristo, aaron.ballman, rsmith. Herald added subscribers: mgrang, mgorny. I'm currently working on the cpu_dispatch and cpu_specific multiversion support, which is making this functionality require a significant amount of function

[PATCH] D43590: [clang-format] Fix regression when getStyle() called with empty filename

2018-02-22 Thread Bjorn Pettersson via Phabricator via cfe-commits
bjope added inline comments. Comment at: unittests/Format/FormatTest.cpp:11727 +TEST(FormatStyle, GetStyleWithEmptyFileName) { + auto Style1 = getStyle("file", "", "Google"); + ASSERT_TRUE((bool)Style1); Do you really want to try to find a ".clang-format" file

r325807 - [docs] Regenerate command line reference

2018-02-22 Thread Jonas Hahnfeld via cfe-commits
Author: hahnfeld Date: Thu Feb 22 09:10:28 2018 New Revision: 325807 URL: http://llvm.org/viewvc/llvm-project?rev=325807&view=rev Log: [docs] Regenerate command line reference Modified: cfe/trunk/docs/ClangCommandLineReference.rst Modified: cfe/trunk/docs/ClangCommandLineReference.rst URL:

[PATCH] D42841: [docs] Improve help for OpenMP options

2018-02-22 Thread Jonas Hahnfeld via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL325806: [docs] Improve help for OpenMP options, NFC. (authored by Hahnfeld, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D42841?vs=132571&id

[PATCH] D42840: [docs] Fix duplicate arguments for JoinedAndSeparate

2018-02-22 Thread Jonas Hahnfeld via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL325805: [docs] Fix duplicate arguments for JoinedAndSeparate (authored by Hahnfeld, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D42840?vs=1

r325806 - [docs] Improve help for OpenMP options, NFC.

2018-02-22 Thread Jonas Hahnfeld via cfe-commits
Author: hahnfeld Date: Thu Feb 22 09:06:35 2018 New Revision: 325806 URL: http://llvm.org/viewvc/llvm-project?rev=325806&view=rev Log: [docs] Improve help for OpenMP options, NFC. * Add HelpText for -fopenmp so that it appears in clang --help. * Hide -fno-openmp-simd, only list the positive opt

r325805 - [docs] Fix duplicate arguments for JoinedAndSeparate

2018-02-22 Thread Jonas Hahnfeld via cfe-commits
Author: hahnfeld Date: Thu Feb 22 09:06:27 2018 New Revision: 325805 URL: http://llvm.org/viewvc/llvm-project?rev=325805&view=rev Log: [docs] Fix duplicate arguments for JoinedAndSeparate We can't see how many arguments are in the meta var name, so just assume that it is the right number. Differ

[PATCH] D43625: [OpenMP] Remove implicit data sharing code gen that aims to use device shared memory

2018-02-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:564 +llvm::Value *FnArgs[] = {ZeroAddr.getPointer(), ZeroAddr.getPointer()}; +emitCall(CGF, Fn, FnArgs); Pass non-null `SourceLocation` here as the last argument Repositor

  1   2   >