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

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

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

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

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

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

[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 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] 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 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(); --

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

[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

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

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

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

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

<    1   2