[PATCH] D54355: Use is.constant intrinsic for __builtin_constant_p

2018-11-13 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 173986. void added a comment. ImpCast. Repository: rC Clang https://reviews.llvm.org/D54355 Files: include/clang/AST/Expr.h lib/AST/ASTImporter.cpp lib/AST/Expr.cpp lib/AST/ExprConstant.cpp lib/CodeGen/CGBuiltin.cpp lib/Sema/SemaDeclCXX.cpp

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-11-13 Thread Zixuan Wu via Phabricator via cfe-commits
wuzish marked an inline comment as done. wuzish added inline comments. Comment at: clang/test/SemaCXX/vector.cpp:26 float = f1(ll16); - f1(c16e); // expected-error{{call to 'f1' is ambiguous}} - f1(ll16e); // expected-error{{call to 'f1' is ambiguous}} + f1(c16e); +

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-11-13 Thread Zixuan Wu via Phabricator via cfe-commits
wuzish updated this revision to Diff 173981. wuzish added a comment. Use return type to distinguish which overload candidate is chosen because different candidate has different pointer return type which can not be converted implicitly without reporting error. https://reviews.llvm.org/D53417

[PATCH] D54496: [HIP] Fix device only compilation

2018-11-13 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC346828: [HIP] Fix device only compilation (authored by yaxunl, committed by ). Repository: rC Clang https://reviews.llvm.org/D54496 Files: lib/Driver/Driver.cpp test/Driver/cuda-phases.cu Index:

r346828 - [HIP] Fix device only compilation

2018-11-13 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Nov 13 20:47:31 2018 New Revision: 346828 URL: http://llvm.org/viewvc/llvm-project?rev=346828=rev Log: [HIP] Fix device only compilation Fix a bug causing host code being compiled when --cude-device-only is set. Differential Revision: https://reviews.llvm.org/D54496

[PATCH] D54505: [CMake] Include clang-apply-replacements in Fuchsia toolchain

2018-11-13 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC346827: [CMake] Include clang-apply-replacements in Fuchsia toolchain (authored by phosek, committed by ). Changed prior to commit: https://reviews.llvm.org/D54505?vs=173969=173980#toc Repository:

r346827 - [CMake] Include clang-apply-replacements in Fuchsia toolchain

2018-11-13 Thread Petr Hosek via cfe-commits
Author: phosek Date: Tue Nov 13 20:06:47 2018 New Revision: 346827 URL: http://llvm.org/viewvc/llvm-project?rev=346827=rev Log: [CMake] Include clang-apply-replacements in Fuchsia toolchain This is needed for run-clang-tidy.py. Differential Revision: https://reviews.llvm.org/D54505 Modified:

[PATCH] D54355: Use is.constant intrinsic for __builtin_constant_p

2018-11-13 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 173974. void added a comment. Fix overflow flag. Repository: rC Clang https://reviews.llvm.org/D54355 Files: include/clang/AST/Expr.h lib/AST/ASTImporter.cpp lib/AST/Expr.cpp lib/AST/ExprConstant.cpp lib/CodeGen/CGBuiltin.cpp

[PATCH] D54355: Use is.constant intrinsic for __builtin_constant_p

2018-11-13 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. I think this is ready now. PTAL. Comment at: lib/CodeGen/CGBuiltin.cpp:1930-1931 +if (CGM.getCodeGenOpts().OptimizationLevel == 0) + // At -O0, we don't perform inlining, so we don't need to delay the + // processing. + return

[PATCH] D54355: Use is.constant intrinsic for __builtin_constant_p

2018-11-13 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 173970. void marked an inline comment as not done. void added a comment. Updated to address comments. Repository: rC Clang https://reviews.llvm.org/D54355 Files: include/clang/AST/Expr.h lib/AST/ASTImporter.cpp lib/AST/Expr.cpp

[PATCH] D54505: [CMake] Include clang-apply-replacements in Fuchsia toolchain

2018-11-13 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: mcgrathr, juliehockett. Herald added subscribers: cfe-commits, mgorny. This is needed for run-clang-tidy.py. Repository: rC Clang https://reviews.llvm.org/D54505 Files: clang/cmake/caches/Fuchsia-stage2.cmake Index:

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-11-13 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: docs/LanguageExtensions.rst:1096 + equivalent to copying the underlying bytes and then dropping the source object + on the floor. * ``__is_destructible`` (MSVC 2013) rjmccall wrote: > Quuxplusone wrote: > >

[PATCH] D52674: [AST] Add Obj-C discriminator to MS ABI RTTI

2018-11-13 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In https://reviews.llvm.org/D52674#1297879, @rjmccall wrote: > I'm not worried about the mangler being re-used for multiple declarations, > I'm worried about a global flag changing how we mangle all components of a > type when we only mean to change it at the top

[PATCH] D54503: [HeaderSearch] loadSubdirectoryModuleMaps should respect -working-directory

2018-11-13 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL346822: [HeaderSearch] loadSubdirectoryModuleMaps should respect -working-directory (authored by arphaman, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r346822 - [HeaderSearch] loadSubdirectoryModuleMaps should respect -working-directory

2018-11-13 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue Nov 13 17:08:03 2018 New Revision: 346822 URL: http://llvm.org/viewvc/llvm-project?rev=346822=rev Log: [HeaderSearch] loadSubdirectoryModuleMaps should respect -working-directory Include search paths can be relative paths. The loadSubdirectoryModuleMaps function

[PATCH] D54466: [Analyzer] [WIP] Iterator Checkers - Use the base region of C++ Base Object Regions (recursively) for iterators stored in a region

2018-11-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > I marked this patch as WIP because I could not create a test-case for it. > However in real projects this patch seems to reduce false positives > significantly. False positives are hard to reduce via delta-debugging because they can be accidentally reduced into true

[PATCH] D54503: [HeaderSearch] loadSubdirectoryModuleMaps should respect -working-directory

2018-11-13 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D54503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D52674: [AST] Add Obj-C discriminator to MS ABI RTTI

2018-11-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I'm not worried about the mangler being re-used for multiple declarations, I'm worried about a global flag changing how we mangle all components of a type when we only mean to change it at the top level. Repository: rC Clang https://reviews.llvm.org/D52674

[PATCH] D52674: [AST] Add Obj-C discriminator to MS ABI RTTI

2018-11-13 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. @rnk pointed out on IRC that the MicrosoftCXXNameMangler is actually specifically designed to manage the mangling of only a single name, in which case adding state to it for handling RTTI seems like a natural approach. @rjmccall, what do you think? I think this is much

[PATCH] D52674: [AST] Add Obj-C discriminator to MS ABI RTTI

2018-11-13 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai updated this revision to Diff 173965. smeenai added a comment. Stateful approach Repository: rC Clang https://reviews.llvm.org/D52674 Files: lib/AST/MicrosoftMangle.cpp test/CodeGenObjCXX/msabi-objc-exceptions-gnustep.mm Index:

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. For the integer conversion though, I was going to add that in a separate fixed-point-to-int and int-to-fixed-point patch. Repository: rC Clang https://reviews.llvm.org/D53738 ___ cfe-commits mailing list

[PATCH] D54489: Implement -frecord-gcc-switches

2018-11-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D54489#1297509, @scott.linder wrote: > In https://reviews.llvm.org/D54489#1297504, @troyj wrote: > > > I realize that you're probably striving for option compatibility with gcc, > > but continuing to name it -frecord-gcc-switches when it

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Sorry for the delay in responding to this. Been working on a few other patches. A couple of the bigger changes so far: - Added `getCommonSemantics` to `FixedPointSemantics` for finding a common full precision semantic. - `getFixedPointSemantics` accepts an int

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 173961. leonardchan marked 11 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D53738 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/Basic/FixedPoint.h clang/lib/AST/ASTContext.cpp

r346818 - Complete reverting r346191

2018-11-13 Thread Tatyana Krasnukha via cfe-commits
Author: tkrasnukha Date: Tue Nov 13 15:59:25 2018 New Revision: 346818 URL: http://llvm.org/viewvc/llvm-project?rev=346818=rev Log: Complete reverting r346191 Removed: cfe/trunk/clang/ ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r346819 - Complete reverting r346191

2018-11-13 Thread Tatyana Krasnukha via cfe-commits
Author: tkrasnukha Date: Tue Nov 13 16:08:34 2018 New Revision: 346819 URL: http://llvm.org/viewvc/llvm-project?rev=346819=rev Log: Complete reverting r346191 Removed: cfe/trunk/CodeGen/ cfe/trunk/Headers/ ___ cfe-commits mailing list

[PATCH] D54503: [HeaderSearch] loadSubdirectoryModuleMaps should respect -working-directory

2018-11-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added a reviewer: bruno. Herald added a subscriber: dexonsmith. Include search paths can be relative paths. The `loadSubdirectoryModuleMaps` function should account for that and respect the `-working-directory` parameter given to Clang. Repository:

[libunwind] r346820 - [CMake] Passthrough CFLAGS when checking the compiler-rt path

2018-11-13 Thread Petr Hosek via cfe-commits
Author: phosek Date: Tue Nov 13 16:09:26 2018 New Revision: 346820 URL: http://llvm.org/viewvc/llvm-project?rev=346820=rev Log: [CMake] Passthrough CFLAGS when checking the compiler-rt path This is needed when cross-compiling for a different target since CFLAGS may contain additional flags like

[PATCH] D54055: CGDecl::emitStoresForConstant fix synthesized constant's name

2018-11-13 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. Seems reasonable to me. Repository: rC Clang https://reviews.llvm.org/D54055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D54496: [HIP] Fix device only compilation

2018-11-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D54496#1297710, @tra wrote: > Do I understand it correctly that the bug appears to affect HIP compilation > only? Yes. Only HIP. https://reviews.llvm.org/D54496 ___ cfe-commits mailing list

[PATCH] D54355: Use is.constant intrinsic for __builtin_constant_p

2018-11-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:1930-1931 +if (CGM.getCodeGenOpts().OptimizationLevel == 0) + // At -O0, we don't perform inlining, so we don't need to delay the + // processing. + return

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-11-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: docs/LanguageExtensions.rst:1096 + equivalent to copying the underlying bytes and then dropping the source object + on the floor. * ``__is_destructible`` (MSVC 2013) Quuxplusone wrote: > rjmccall wrote: > >

[PATCH] D54055: CXXNameMangler::mangleFunctionParam: fix assertion

2018-11-13 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 173946. jfb added a comment. - clang-format Repository: rC Clang https://reviews.llvm.org/D54055 Files: lib/CodeGen/CGDecl.cpp test/CodeGen/decl.c test/CodeGen/dump-struct-builtin.c test/CodeGenCXX/amdgcn-string-literal.cpp

[PATCH] D18860: [analyzer] Fix the "Zombie symbols" issue.

2018-11-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Nope, unit tests aren't quite useful here. I can't unit-test the behavior of API that i'm about to //remove//... right? https://reviews.llvm.org/D18860 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D54055: CXXNameMangler::mangleFunctionParam: fix assertion

2018-11-13 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In https://reviews.llvm.org/D54055#1286523, @rjmccall wrote: > Pfft, if I'm going to be held responsible for my own work, I'm in a lot of > trouble. :) > > Function name + local variable name WFM. Your wish is my command (in this specific instance anyways). Repository:

[PATCH] D54055: CXXNameMangler::mangleFunctionParam: fix assertion

2018-11-13 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 173945. jfb added a comment. Herald added subscribers: nhaehnle, jvesely. - As discussed on the review, change the constant generation to name the synthesized constant using '__const.' + function_name + '.' variable_name. The previous code wasn't generally

[PATCH] D54496: [HIP] Fix device only compilation

2018-11-13 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. Do I understand it correctly that the bug appears to affect HIP compilation only? https://reviews.llvm.org/D54496 ___ cfe-commits mailing list

[PATCH] D54355: Use is.constant intrinsic for __builtin_constant_p

2018-11-13 Thread Bill Wendling via Phabricator via cfe-commits
void marked an inline comment as not done. void added inline comments. Comment at: lib/AST/Expr.cpp:2915-2916 + case ConstantExprClass: { +const Expr *Exp = cast(this)->getSubExpr(); +return Exp->isConstantInitializer(Ctx, false, Culprit); + } void

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-11-13 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: docs/LanguageExtensions.rst:1096 + equivalent to copying the underlying bytes and then dropping the source object + on the floor. * ``__is_destructible`` (MSVC 2013) rjmccall wrote: > Quuxplusone wrote: > >

[PATCH] D54162: OpenCL: Don't warn on v printf modifier

2018-11-13 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r346806 https://reviews.llvm.org/D54162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r346806 - OpenCL: Don't warn on v printf modifier

2018-11-13 Thread Matt Arsenault via cfe-commits
Author: arsenm Date: Tue Nov 13 14:30:35 2018 New Revision: 346806 URL: http://llvm.org/viewvc/llvm-project?rev=346806=rev Log: OpenCL: Don't warn on v printf modifier This avoids spurious warnings, but could use a lot of work. For example the number of vector elements is not verified, and the

[PATCH] D54258: [Clang] Fix pretty printing of CUDA address spaces

2018-11-13 Thread Richard Membarth via Phabricator via cfe-commits
richardmembarth added a comment. > In https://reviews.llvm.org/D54258#1297191, @Anastasia wrote: > > I agree with the change itself... but it's quite annoying that such things > can't be tested. :( Yes, that's a pity :( Is there anything missing so that this can be merged? Repository: rC

[PATCH] D54496: [HIP] Fix device only compilation

2018-11-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Fix a bug causing host code being compiled when `--cude-device-only` is set. https://reviews.llvm.org/D54496 Files: lib/Driver/Driver.cpp test/Driver/cuda-phases.cu Index: test/Driver/cuda-phases.cu

[PATCH] D51575: [clang-tidy/checks] Implement a clang-tidy check to verify Google Objective-C function naming conventions 

2018-11-13 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. Thanks for the review everyone! Let me know if there are any further changes that you want me to make or any further action required on my part to land this  Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51575

[PATCH] D51575: [clang-tidy/checks] Implement a clang-tidy check to verify Google Objective-C function naming conventions 

2018-11-13 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 173936. stephanemoore added a comment. Reworded "upper camel case" to "Pascal case". Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51575 Files: clang-tidy/google/CMakeLists.txt clang-tidy/google/FunctionNamingCheck.cpp

[PATCH] D53770: Support g++ headers in include/g++

2018-11-13 Thread David Greene via Phabricator via cfe-commits
greened added a comment. Oops, I didn't realize this hadn't been formally accepted yet. Still learning the Phab process. Let me know if you want it reverted for a formal accept. Repository: rL LLVM https://reviews.llvm.org/D53770 ___

[PATCH] D54493: [OPENMP] Check target architecture supports unified shared memory for requires directive

2018-11-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang https://reviews.llvm.org/D54493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r346802 - [Driver] Support g++ headers in include/g++

2018-11-13 Thread David Greene via cfe-commits
Author: greened Date: Tue Nov 13 13:38:45 2018 New Revision: 346802 URL: http://llvm.org/viewvc/llvm-project?rev=346802=rev Log: [Driver] Support g++ headers in include/g++ ray's gcc installation puts C++ headers in PREFIX/include/g++ without indicating a gcc version at all. Typically this is

[PATCH] D53770: Support g++ headers in include/g++

2018-11-13 Thread David Greene via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL346802: [Driver] Support g++ headers in include/g++ (authored by greened, committed by ). Herald added a subscriber:

r346801 - [AST] Revert r346793 and r346781

2018-11-13 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Tue Nov 13 13:33:22 2018 New Revision: 346801 URL: http://llvm.org/viewvc/llvm-project?rev=346801=rev Log: [AST] Revert r346793 and r346781 This somehow breaks the msan bots. Revert while I figure it out. Modified: cfe/trunk/include/clang/AST/Expr.h

[PATCH] D18860: [analyzer] Fix the "Zombie symbols" issue.

2018-11-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 173932. NoQ added a comment. In https://reviews.llvm.org/D18860#1284805, @NoQ wrote: > `RetainCountChecker` is affected, as demonstrated by the newly added test. `RetainCountChecker` is affected due to temporary insanity in the checker that was induced by

[PATCH] D54463: [CMake] Support cross-compiling with Fuchsia toolchain build

2018-11-13 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang https://reviews.llvm.org/D54463 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D54438: [analyzer][WIP] Reimplement dependencies between checkers

2018-11-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Hmm, makes sense. Maybe `static bool BlahBlahChecker::isApplicable(const LangOpts )` or something like that. Btw, maybe instead of default constructor and `->setup(Args)` method we could stuff all of the `setup(Args)`'s arguments into the one-and-only constructor for the

[PATCH] D54493: [OPENMP] Check target architecture supports unified shared memory for requires directive

2018-11-13 Thread Patrick Lyster via Phabricator via cfe-commits
patricklyster created this revision. patricklyster added reviewers: ABataev, Hahnfeld, RaviNarayanaswamy, mikerice, kkwli0, hfinkel, gtbercea. patricklyster added projects: OpenMP, clang. Herald added subscribers: cfe-commits, guansong, jholewinski. Restriction on `unified_shared_memory` clause

[PATCH] D53717: [AST] Only store the needed data in ForStmt.

2018-11-13 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno abandoned this revision. riccibruno added a comment. Herald added a reviewer: shafik. Let's close it for now. I agree that the complexity is probably not worth it. We can always resurrect it in the future. I will submit a patch doing the move into a new `StmtBase.h/.cpp` after I am

[PATCH] D54438: [analyzer][WIP] Reimplement dependencies between checkers

2018-11-13 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Thanks you so much! One of the reasons why I love working on this is because the great feedback I get. I don't wanna seem annoyingly grateful, but it's been a very enjoyable experience so far. > This should not cause a warnings because it should be fine to compile >

[PATCH] D54355: Use is.constant intrinsic for __builtin_constant_p

2018-11-13 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: include/clang/AST/Expr.h:908-912 + static ConstantExpr *Create(const ASTContext , Expr *E) { +if (ConstantExpr *CE = dyn_cast(E)) + return CE; +return new (Context) ConstantExpr(E); + } rsmith wrote: > If

[PATCH] D54355: Use is.constant intrinsic for __builtin_constant_p

2018-11-13 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 173922. void marked an inline comment as done. void added a comment. Remove some extraneous checks. Repository: rC Clang https://reviews.llvm.org/D54355 Files: include/clang/AST/Expr.h lib/AST/ASTImporter.cpp lib/AST/Expr.cpp

[PATCH] D54356: Convert CheckICE into a statment visitor

2018-11-13 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In https://reviews.llvm.org/D54356#1297543, @rsmith wrote: > In https://reviews.llvm.org/D54356#1297522, @void wrote: > > > Okay. I'll revert this then. > > > I don't think we necessarily need the change in the other patch that's based > on this one, but I still think this

[PATCH] D54356: Convert CheckICE into a statment visitor

2018-11-13 Thread Bill Wendling via Phabricator via cfe-commits
void abandoned this revision. void added a comment. This isn't necessary. We can assume it's in a constant context because it's checking for an ICE. Repository: rC Clang https://reviews.llvm.org/D54356 ___ cfe-commits mailing list

[PATCH] D54356: Convert CheckICE into a statment visitor

2018-11-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D54356#1297522, @void wrote: > Okay. I'll revert this then. I don't think we necessarily need the change in the other patch that's based on this one, but I still think this refactoring is an improvement :) Repository: rC Clang

[PATCH] D54356: Convert CheckICE into a statment visitor

2018-11-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D54356#1297506, @void wrote: > This code is called in over 90 places, so it's hard to tell if they all are > in a constant context. Though I suppose that what this

[PATCH] D54356: Convert CheckICE into a statment visitor

2018-11-13 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Okay. I'll revert this then. Repository: rC Clang https://reviews.llvm.org/D54356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D54356: Convert CheckICE into a statment visitor

2018-11-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D54356#1297470, @rsmith wrote: > Can you explain more about the justification for this? The code today has a > covered switch, which is useful for maintainability -- anyone adding a new > `Expr` node gets told they need to think about and

[PATCH] D54489: Implement -frecord-gcc-switches

2018-11-13 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a comment. In https://reviews.llvm.org/D54489#1297504, @troyj wrote: > I realize that you're probably striving for option compatibility with gcc, > but continuing to name it -frecord-gcc-switches when it actually records > Clang switches seems weird to me. It almost sounds

[PATCH] D54356: Convert CheckICE into a statment visitor

2018-11-13 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. This code is called in over 90 places, so it's hard to tell if they all are in a constant context. Though I suppose that what this code is supposed to check for would work the same in a constant context as without one. I can revert this if you want, but to be honest the

[PATCH] D54489: Implement -frecord-gcc-switches

2018-11-13 Thread Troy Johnson via Phabricator via cfe-commits
troyj added a comment. I realize that you're probably striving for option compatibility with gcc, but continuing to name it -frecord-gcc-switches when it actually records Clang switches seems weird to me. It almost sounds like something that would dump gcc equivalents of all Clang options, or

[PATCH] D54355: Use is.constant intrinsic for __builtin_constant_p

2018-11-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/Expr.h:908-912 + static ConstantExpr *Create(const ASTContext , Expr *E) { +if (ConstantExpr *CE = dyn_cast(E)) + return CE; +return new (Context) ConstantExpr(E); + } If we're creating

r346793 - [AST][NFC] Order the bit-field classes of Stmt like in StmtNodes.td

2018-11-13 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Tue Nov 13 12:23:11 2018 New Revision: 346793 URL: http://llvm.org/viewvc/llvm-project?rev=346793=rev Log: [AST][NFC] Order the bit-field classes of Stmt like in StmtNodes.td Reorder the bit-field classes and the members of the anonymous union so that they both match the

[PATCH] D54356: Convert CheckICE into a statment visitor

2018-11-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Can you explain more about the justification for this? The code today has a covered switch, which is useful for maintainability -- anyone adding a new `Expr` node gets told they need to think about and update this code. Are there any cases where we check for an ICE and

[PATCH] D54473: [sanitizers] Initial implementation for -fsanitize=init-locals

2018-11-13 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc added a comment. This new flag inhibits the warnings from -Wuninitialized, right? While this is fine for experimenting (and I want to have this in ToT to enable wide experimentation) we should clearly state (in the comments) that the final intent is to make the feature work together with

[PATCH] D54243: DebugInfo: Add a driver flag for DWARF debug_ranges base address specifier use.

2018-11-13 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Settled on renaming the flag for consistency with, say, -fdebug-types-section, to -fdebug-ranges-base-address (though 'debug' is sort of ambiguous (Clang can produce non-DWARF debug info) but this driver (as opposed to clang-cl) is intended for DWARF emission, not PDB

[PATCH] D54243: DebugInfo: Add a driver flag for DWARF debug_ranges base address specifier use.

2018-11-13 Thread David Blaikie via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL346789: DebugInfo: Add a driver flag for DWARF debug_ranges base address specifier use. (authored by dblaikie, committed

r346789 - DebugInfo: Add a driver flag for DWARF debug_ranges base address specifier use.

2018-11-13 Thread David Blaikie via cfe-commits
Author: dblaikie Date: Tue Nov 13 12:08:13 2018 New Revision: 346789 URL: http://llvm.org/viewvc/llvm-project?rev=346789=rev Log: DebugInfo: Add a driver flag for DWARF debug_ranges base address specifier use. Summary: This saves a lot of relocations in optimized object files (at the cost of

[PATCH] D54489: Implement -frecord-gcc-switches

2018-11-13 Thread Scott Linder via Phabricator via cfe-commits
scott.linder created this revision. Herald added a subscriber: cfe-commits. See the parent revision https://reviews.llvm.org/D54487 for differences between this implementation and the equivalent GCC option. Repository: rC Clang https://reviews.llvm.org/D54489 Files:

[PATCH] D54488: [AST] [analyzer] NFC: Reuse code in stable ID dumping methods.

2018-11-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: george.karpenkov, rsmith. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Use the new fancy method introduced in https://reviews.llvm.org/D54486 to simplify

[PATCH] D53522: [Frontend] Include module map header declaration in dependency file output

2018-11-13 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. The test case I've promised is touch a.h touch b.h touch c.h ln -s b.h d.h echo '#include "a.h"' > umbrella.h echo '#include "b.h"' >> umbrella.h echo '#include "b.h"' > test_case.c cat < module.modulemap module my_module { umbrella header

[PATCH] D54438: [analyzer][WIP] Reimplement dependencies between checkers

2018-11-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D54438#1296832, @Szelethus wrote: > - Some checkers do not register themselves in all cases[1], which should > probably be handled at a higher level, preferably in `Checkers.td`. Warnings > could be emitted when a checker is explicitly enabled

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-11-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: docs/LanguageExtensions.rst:1096 + equivalent to copying the underlying bytes and then dropping the source object + on the floor. * ``__is_destructible`` (MSVC 2013) Quuxplusone wrote: > rjmccall wrote: > >

r346781 - [AST][NFC] Style fixes for UnaryOperator

2018-11-13 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Tue Nov 13 11:27:39 2018 New Revision: 346781 URL: http://llvm.org/viewvc/llvm-project?rev=346781=rev Log: [AST][NFC] Style fixes for UnaryOperator In preparation for the patch which will move some data to the bit-fields of Stmt. In particular, rename the private

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-11-13 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/AST/Type.cpp:2234 +bool QualType::isTriviallyRelocatableType(const ASTContext ) const { + QualType T = Context.getBaseElementType(*this); + if (T->isIncompleteType()) Quuxplusone wrote: > erichkeane wrote: > >

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-11-13 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: docs/LanguageExtensions.rst:1096 + equivalent to copying the underlying bytes and then dropping the source object + on the floor. * ``__is_destructible`` (MSVC 2013) rjmccall wrote: > Quuxplusone wrote: > >

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-11-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: docs/LanguageExtensions.rst:1096 + equivalent to copying the underlying bytes and then dropping the source object + on the floor. * ``__is_destructible`` (MSVC 2013) Quuxplusone wrote: > @rjmccall wrote: > >

[PATCH] D54245: [VFS] Implement `RedirectingFileSystem::getRealPath`.

2018-11-13 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Ping. https://reviews.llvm.org/D54245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D54356: Convert CheckICE into a statment visitor

2018-11-13 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Ping? Repository: rC Clang https://reviews.llvm.org/D54356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D54355: Use is.constant intrinsic for __builtin_constant_p

2018-11-13 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Ping? Repository: rC Clang https://reviews.llvm.org/D54355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51762: First part of the calendar stuff

2018-11-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Ugh i cannot close it :/ https://reviews.llvm.org/D51762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D54404: Exclude matchers which can have multiple results

2018-11-13 Thread Samuel Benzaquen via Phabricator via cfe-commits
sbenza added a comment. In https://reviews.llvm.org/D54404#1296224, @aaron.ballman wrote: > In https://reviews.llvm.org/D54404#1295426, @steveire wrote: > > > I acknowledge and share the future-proofing concern. > > > > We could possibly use something trait-based instead and put the trait > >

[PATCH] D51762: First part of the calendar stuff

2018-11-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. Whoops right sry again! https://reviews.llvm.org/D51762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53934: [clangd] Improve code completion for ObjC methods

2018-11-13 Thread David Goldman via Phabricator via cfe-commits
dgoldman added a comment. Since I don't have commit access, @sammccall will land this. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-11-13 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone marked 3 inline comments as done. Quuxplusone added inline comments. Comment at: docs/LanguageExtensions.rst:1096 + equivalent to copying the underlying bytes and then dropping the source object + on the floor. * ``__is_destructible`` (MSVC 2013)

[PATCH] D52296: [Clang] - Add '-gsplit-dwarf[=split, =single]' version for '-gsplit-dwarf' option.

2018-11-13 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added inline comments. This revision is now accepted and ready to land. Comment at: lib/Driver/ToolChains/CommonArgs.cpp:813-830 + if (Arg *A = Args.getLastArg(options::OPT_gsplit_dwarf_EQ)) +if (StringRef(A->getValue()) ==

r346770 - [AST][NFC] Pack DeclRefExpr

2018-11-13 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Tue Nov 13 09:56:44 2018 New Revision: 346770 URL: http://llvm.org/viewvc/llvm-project?rev=346770=rev Log: [AST][NFC] Pack DeclRefExpr Move the SourceLocation to the bit-fields of Stmt + clang-format. This saves one pointer per DeclRefExpr but otherwise NFC. Modified:

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-11-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:4289 + /*BasePath=*/nullptr, CCK) + .get(); Anastasia wrote: > rjmccall wrote: > > Okay. But if `ToType` *isn't* a reference type, this will never

[PATCH] D54258: [Clang] Fix pretty printing of CUDA address spaces

2018-11-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D54258#1296706, @richardmembarth wrote: > CUDA maps `__shared__` internally also to `__attribute__((shared))`: > > #define __annotate__(a) \ > __attribute__((a)) > #define __location__(a) \ > __annotate__(a) > ... >

[PATCH] D54253: [OpenCL][NFC] Improve test coverage of test/Index/opencl-types.cl

2018-11-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I am a bit confused about this testing since you are running OpenCL on architectures that aren't supposed to support it. Can you provide more details on why you are doing this? Repository: rC Clang https://reviews.llvm.org/D54253

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-11-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:4289 + /*BasePath=*/nullptr, CCK) + .get(); rjmccall wrote: > Okay. But if `ToType` *isn't* a reference type, this will never be an >

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-11-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 173873. Anastasia added a comment. Rewrite how CastKind is set for reference and pointer type. https://reviews.llvm.org/D53764 Files: include/clang/Sema/Sema.h lib/AST/Expr.cpp lib/CodeGen/CGExpr.cpp lib/Sema/DeclSpec.cpp lib/Sema/SemaDecl.cpp

[PATCH] D54428: [clangd] XPC transport layer, framework, test-client

2018-11-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. A question about the high-level build target setup (I don't know much about XPC services/frameworks, bear with me...): This is set up so that the clangd binary (ClangdMain) can run unmodified as an XPC service, all flags and options are still respected etc. At the

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-11-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D50119#1297070, @dblaikie wrote: > Hey @rjmccall - I'm trying to remember, but can't get it quite clear in my > head. I seem to recall some discussion about trivial_abi not implying/being > strong enough for all the cases that

  1   2   >