[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-02-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:543 + return CB(InpAST.takeError()); +CB(clangd::getTypeHierarchy(InpAST->AST, Item.range.start, Resolve, +Direction)); nridge wrote:

[PATCH] D58056: Look through typedefs in getFunctionTypeWithExceptionSpec

2019-02-13 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. committed for now to get the crash fixed; if there are issues with the test they can be addressed later Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58056/new/ https://reviews.llvm.org/D58056

r353931 - Look through typedefs in getFunctionTypeWithExceptionSpec

2019-02-13 Thread Stephan Bergmann via cfe-commits
Author: sberg Date: Wed Feb 13 01:39:17 2019 New Revision: 353931 URL: http://llvm.org/viewvc/llvm-project?rev=353931=rev Log: Look through typedefs in getFunctionTypeWithExceptionSpec Fixes https://bugs.llvm.org/show_bug.cgi?id=40658 Differential Revision: https://reviews.llvm.org/D58056

[PATCH] D57898: CodeGen: Fix PR40605: split constant structures generated by -ftrivial-auto-var-init when emitting initializators

2019-02-13 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added inline comments. Comment at: tools/clang/lib/CodeGen/CGDecl.cpp:979 + if (CGM.getCodeGenOpts().OptimizationLevel == 0) +return false; + if (GlobalSize <= SizeLimit) jfb wrote: > The general 64-byte heuristic is fine with me. It's just a bit

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-02-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:842 + + StringRef Filename = SM.getFilename(BeginLoc); + std::string FileURI = toURI(SM, Filename, {}); sammccall wrote: > This is more conversions than necessary. > I think we

[PATCH] D57898: CodeGen: Fix PR40605: split constant structures generated by -ftrivial-auto-var-init when emitting initializators

2019-02-13 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. Well, now we somewhat break padding initialization. E.g. for the following struct: struct s { int a; char b; long int c; }; we generate the following constant initializer with `-O0`: .L__const.foo.local: .long 2863311530 #

[PATCH] D58135: [clangd] Handle a few more diag kinds in include fixer.

2019-02-13 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL353926: [clangd] Handle a few more diag kinds in include fixer. (authored by ioeric, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES

[clang-tools-extra] r353926 - [clangd] Handle a few more diag kinds in include fixer.

2019-02-13 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed Feb 13 00:58:54 2019 New Revision: 353926 URL: http://llvm.org/viewvc/llvm-project?rev=353926=rev Log: [clangd] Handle a few more diag kinds in include fixer. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags:

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

2019-02-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. @rnkovacs and @xazax.hun might be able to help with that? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50488/new/ https://reviews.llvm.org/D50488 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D58062: Support framework import/include auto-completion

2019-02-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Code looks good apart from one case where we encounter Foo.framework/Subdir1/Subdir2. Can you add a test to `clang/test/CodeCompletion`? `included-files.cpp` has the existing tests, not sure if you can add them there or it needs to be an obj-c file for framework

[PATCH] D57898: CodeGen: Fix PR40605: split constant structures generated by -ftrivial-auto-var-init when emitting initializators

2019-02-13 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 186605. glider marked 4 inline comments as done. glider added a comment. Addressed the comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57898/new/ https://reviews.llvm.org/D57898 Files: tools/clang/lib/CodeGen/CGDecl.cpp

[PATCH] D57655: clang-format with UseTab: Always sometimes doesn't insert the right amount of tabs.

2019-02-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Seems reasonable. LG with a couple of nits. Please let me know if you need to commit this for you. Comment at:

[PATCH] D58056: Look through typedefs in getFunctionTypeWithExceptionSpec

2019-02-13 Thread Stephan Bergmann 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 rC353931: Look through typedefs in getFunctionTypeWithExceptionSpec (authored by sberg, committed by ). Changed prior to

[PATCH] D58157: Stop enabling clang-tools-extra automatically when clang is in LLVM_ENABLE_PROJECTS

2019-02-13 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. In D58157#1395762 , @mehdi_amini wrote: > In D58157#1395716 , @rnk wrote: > > > I think we have consensus, > > > Based on three comments in a revision? Seems strange to me. > I don't really

[PATCH] D58107: [MinGW] Add the profiling library when necessary

2019-02-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D58107#1396063 , @davezarzycki wrote: > This change breaks building/testing the compiler with `CLANG_DEFAULT_LINKER` > set to `lld`. Was this intentional? What should people do if they want to use > `CLANG_DEFAULT_LINKER`

[PATCH] D57898: CodeGen: Fix PR40605: split constant structures generated by -ftrivial-auto-var-init when emitting initializators

2019-02-13 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. ... which happily skips the padding. It occurs to me that we need to properly handle the padding in `patternFor` before we'll be able to split the structures. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57898/new/ https://reviews.llvm.org/D57898

Re: r350404 - Refactor the way we handle diagnosing unused expression results.

2019-02-13 Thread Hans Wennborg via cfe-commits
Reverted on the release_80 branch in r353935. On Fri, Jan 4, 2019 at 6:01 PM Aaron Ballman via cfe-commits wrote: > > Author: aaronballman > Date: Fri Jan 4 08:58:14 2019 > New Revision: 350404 > > URL: http://llvm.org/viewvc/llvm-project?rev=350404=rev > Log: > Refactor the way we handle

[PATCH] D58035: [clang/DIVar] Emit flag for params that have unchanged values

2019-02-13 Thread Djordje Todorovic via Phabricator via cfe-commits
djtodoro updated this revision to Diff 186611. djtodoro added a comment. - Rename: `VariableNotChanged `===> `ArgumentNotModified` - Refactor a test case CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58035/new/ https://reviews.llvm.org/D58035 Files: include/clang/AST/Decl.h

[PATCH] D58067: [Analyzer] Crash fix for FindLastStoreBRVisitor

2019-02-13 Thread Balogh , Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC353943: [Analyzer] Crash fix for FindLastStoreBRVisitor (authored by baloghadamsoftware, committed by ). Changed prior to commit: https://reviews.llvm.org/D58067?vs=186470=186625#toc Repository: rC

r353943 - [Analyzer] Crash fix for FindLastStoreBRVisitor

2019-02-13 Thread Adam Balogh via cfe-commits
Author: baloghadamsoftware Date: Wed Feb 13 04:25:47 2019 New Revision: 353943 URL: http://llvm.org/viewvc/llvm-project?rev=353943=rev Log: [Analyzer] Crash fix for FindLastStoreBRVisitor FindLastStoreBRVisitor tries to find the first node in the exploded graph where the current value was

[PATCH] D58107: [MinGW] Add the profiling library when necessary

2019-02-13 Thread David Zarzycki via Phabricator via cfe-commits
davezarzycki added a comment. This change breaks building/testing the compiler with `CLANG_DEFAULT_LINKER` set to `lld`. Was this intentional? What should people do if they want to use `CLANG_DEFAULT_LINKER` and run the test suite? Repository: rL LLVM CHANGES SINCE LAST ACTION

r353946 - [test] Tweak driver test from r353917 and r353922 to pass with a nondefault CLANG_DEFAULT_LINKER

2019-02-13 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Wed Feb 13 05:13:45 2019 New Revision: 353946 URL: http://llvm.org/viewvc/llvm-project?rev=353946=rev Log: [test] Tweak driver test from r353917 and r353922 to pass with a nondefault CLANG_DEFAULT_LINKER Force -fuse-ld=ld, as some other tests in the same file do. Loosen

[PATCH] D57655: clang-format with UseTab: Always sometimes doesn't insert the right amount of tabs.

2019-02-13 Thread Hylke Kleve via Phabricator via cfe-commits
hyklv updated this revision to Diff 186629. hyklv marked 2 inline comments as done. hyklv added a comment. Updated comment and added break; Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57655/new/ https://reviews.llvm.org/D57655 Files:

[PATCH] D58074: [OpenMP 5.0] Parsing/sema support for map clause with mapper modifier

2019-02-13 Thread Lingda Li via Phabricator via cfe-commits
lildmh added a reviewer: kkwli0. lildmh marked 4 inline comments as done. lildmh added inline comments. Comment at: lib/Parse/ParseOpenMP.cpp:2144 +parseMapType(*this, Data); } if (Data.MapType == OMPC_MAP_unknown) { kkwli0 wrote: > Although it

[PATCH] D58095: [clang-tidy] Make google-objc-function-naming ignore implicit functions 

2019-02-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: clang-tools-extra/test/clang-tidy/Inputs/Headers/stdio.h:1 +#ifndef _STDIO_H_ +#define _STDIO_H_ stephanemoore wrote: >

[PATCH] D45978: dllexport const variables must have external linkage.

2019-02-13 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 186641. zahiraam marked 5 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D45978/new/ https://reviews.llvm.org/D45978 Files: lib/Sema/SemaDecl.cpp test/CodeGen/dllexport-1.c test/Sema/dllexport-1.cpp

[PATCH] D45978: dllexport const variables must have external linkage.

2019-02-13 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D45978/new/ https://reviews.llvm.org/D45978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D57080: [clang-tidy] Delete obsolete objc-property-declaration options ✂️

2019-02-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57080/new/ https://reviews.llvm.org/D57080

[PATCH] D45978: dllexport const variables must have external linkage.

2019-02-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D45978/new/ https://reviews.llvm.org/D45978 ___ cfe-commits mailing

[PATCH] D57655: clang-format with UseTab: Always sometimes doesn't insert the right amount of tabs.

2019-02-13 Thread Hylke Kleve via Phabricator via cfe-commits
hyklv added a comment. In D57655#1395924 , @alexfh wrote: > Seems reasonable. LG with a couple of nits. Please let me know if you need to > commit this for you. cool. could you commit the change for me? Repository: rC Clang CHANGES SINCE LAST

[PATCH] D57855: [analyzer] Reimplement checker options

2019-02-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Herald added a subscriber: jdoerfert. Comment at: include/clang/StaticAnalyzer/Checkers/CheckerBase.td:13-14 +/// Describes a checker or package option type. This is important for validating +/// user supplied inputs. +class

[PATCH] D53928: Enable builtins necessary for SLEEF [AArch64] vectorized trigonometry libm functions

2019-02-13 Thread Renato Golin via Phabricator via cfe-commits
rengolin added a comment. Herald added a subscriber: jdoerfert. Funny thing is, SVML is also only supported, AFAIK, for Intel. I agree that we should emit errors, but we should also emit a similar error on SVML. I know it's not entirely relevant to this patch, but we should keep the behaviour

[PATCH] D58120: [Builtins] Treat `bcmp` as a builtin.

2019-02-13 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 186644. courbet added a comment. Herald added a subscriber: jdoerfert. - Add tests for warnings. - Fix signature for intrinsic. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58120/new/ https://reviews.llvm.org/D58120 Files:

[PATCH] D58120: [Builtins] Treat `bcmp` as a builtin.

2019-02-13 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 186645. courbet added a comment. - add __builtin_bcmp constant evaluation tests. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58120/new/ https://reviews.llvm.org/D58120 Files: include/clang/Basic/Builtins.def

r353952 - [HIP] Handle compile -m options and propagate into LLC

2019-02-13 Thread Aaron Enye Shi via cfe-commits
Author: aaronenyeshi Date: Wed Feb 13 08:12:16 2019 New Revision: 353952 URL: http://llvm.org/viewvc/llvm-project?rev=353952=rev Log: [HIP] Handle compile -m options and propagate into LLC Allow the compile options for -m such as -mxnack/-mno-xnack, -msram-ecc/-mno-sram-ecc,

[PATCH] D58178: isRawStringLiteral doesn't check all erroneous cases

2019-02-13 Thread Goran Mitrovic via Phabricator via cfe-commits
gmit updated this revision to Diff 186675. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58178/new/ https://reviews.llvm.org/D58178 Files: RawStringLiteralCheck.cpp

[PATCH] D58178: isRawStringLiteral doesn't check all erroneous cases

2019-02-13 Thread Goran Mitrovic via Phabricator via cfe-commits
gmit added a comment. Sorry, this is my first LLVM commit, so I don't really know the procedure. There is no test as it cannot be reproduced. The crash caused by this was spotted in one of our customer's crash dumps. The added condition should be obvious as it is tested in the assert just

[PATCH] D58178: [clang-tidy] RawStringLiteralCheck: isRawStringLiteral doesn't check all erroneous cases

2019-02-13 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D58178#1396388 , @gmit wrote: > The added condition should be obvious as it is tested in the assert just > above. Well, then the fix is not correct. Because you won't get to that `return`, since the `assert()` just above

[PATCH] D58091: Customize warnings for missing built-in type

2019-02-13 Thread Brian Cain via Phabricator via cfe-commits
bcain added a comment. I reported PR40692. I just tried this patch on our local build where we saw the failure on an RTOS implementing pthreads. Unfortunately with this patch I encountered an (unrelated) assertion. So this fix was inconclusive for me (for now). I will follow up but if this

[PATCH] D58091: Customize warnings for missing built-in type

2019-02-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D58091#1396382 , @aaron.ballman wrote: > If I'm following along properly, it sounds like we want to disable this > warning largely because it can appear in header files attempting to declare > the functions in question.

[PATCH] D58091: Customize warnings for missing built-in type

2019-02-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D58091#1396393 , @bcain wrote: > I reported PR40692. I just tried this patch on our local build where we saw > the failure on an RTOS implementing pthreads. Unfortunately with this patch > I encountered an (unrelated)

[PATCH] D54978: Move the SMT API to LLVM

2019-02-13 Thread Brian Rzycki via Phabricator via cfe-commits
brzycki added a comment. > perhaps something like this: > > if(Z3_INCLUDE_DIR AND EXISTS "${Z3_INCLUDE_DIR }/z3_version.h") > file(STRINGS "${Z3_INCLUDE_DIR }/z3_version.h" z3_version_str REGEX > "^#define[\t ]+Z3_FULL_VERSION[\t ]+\".*\"") > > string(REGEX REPLACE

[PATCH] D58060: Fix diagnostic for addr spaces in static_cast

2019-02-13 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. So static_cast permits conversions from AS1 to AS2 where that conversion is implicitly allowed, and the new addrspace_cast would permit conversions from AS1 to AS2 where it is explicitly allowed. That seems like it fits in rather well with the idea in D57464

[PATCH] D57898: CodeGen: Fix PR40605: split constant structures generated by -ftrivial-auto-var-init when emitting initializators

2019-02-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: tools/clang/lib/CodeGen/CGDecl.cpp:979 + if (CGM.getCodeGenOpts().OptimizationLevel == 0) +return false; + if (GlobalSize <= SizeLimit) glider wrote: > jfb wrote: > > The general 64-byte heuristic is fine with

[PATCH] D58178: [clang-tidy] RawStringLiteralCheck: isRawStringLiteral doesn't check all erroneous cases

2019-02-13 Thread Goran Mitrovic via Phabricator via cfe-commits
gmit added a comment. ? I'm sorry, but I disagree. Assert draws attention in the debug build only. In the release build asserts are not evaluated at all and the condition needs to be checked in the code that executes (if it makes sense and in this case it does as it causes reading out of

[PATCH] D58164: Block+lambda: allow reference capture

2019-02-13 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. I talked to Akira in meatspace, and it seems like this updated patch does the right thing. He suggested changing the AST as a longer-term solution, but for now this approach seems simple enough. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D58164: Block+lambda: allow reference capture

2019-02-13 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 186752. jfb added a comment. - Check for references when looking for copyexpr directly. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58164/new/ https://reviews.llvm.org/D58164 Files: lib/CodeGen/CGBlocks.cpp

[PATCH] D58161: Print a note to the called macro when diagnosing err_embedded_directive

2019-02-13 Thread Nico Weber via Phabricator via cfe-commits
thakis marked 2 inline comments as done. thakis added a comment. Thanks! Comment at: clang/lib/Lex/PPMacroExpansion.cpp:497 + Args = ReadMacroCallArgumentList(Identifier, MI, ExpansionEnd); rnk wrote: > thakis wrote: > > rnk wrote: > > > Can this

[PATCH] D58195: [HWASAN] Updated HWASAN design document to better portray the chance of missing a bug.

2019-02-13 Thread Mitch Phillips via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC353990: [HWASAN] Updated HWASAN design document to better portray the chance of missing… (authored by hctim, committed by ). Changed prior to commit:

[PATCH] D58091: Customize warnings for missing built-in type

2019-02-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:591 +def warn_implicit_decl_no_jmp_buf +: Warning<"declaration of built-in '%0' requires the definition of the " + "'jmp_buf' type">, We only require a

r354001 - Relax restriction in tests to where "-emit-llvm-bc" and "-emit-obj" must appear.

2019-02-13 Thread Douglas Yung via cfe-commits
Author: dyung Date: Wed Feb 13 17:11:32 2019 New Revision: 354001 URL: http://llvm.org/viewvc/llvm-project?rev=354001=rev Log: Relax restriction in tests to where "-emit-llvm-bc" and "-emit-obj" must appear. The CHECK lines as structured were requiring them to appear only in a certain position

[PATCH] D58214: [CMake][Fuchsia] Enable experimental pass manager by default

2019-02-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan accepted this revision. leonardchan added a comment. This revision is now accepted and ready to land. LGTM. Doesn't seem to break anything as far as I can see. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58214/new/ https://reviews.llvm.org/D58214

[PATCH] D58157: Stop enabling clang-tools-extra automatically when clang is in LLVM_ENABLE_PROJECTS

2019-02-13 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. We need to update https://github.com/llvm/llvm-zorg/blob/master/zorg/buildbot/builders/FuchsiaBuilder.py#L102 as well as our downstream bots, but other than that I'm fine with this change. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58157/new/

[PATCH] D58214: [CMake][Fuchsia] Enable experimental pass manager by default

2019-02-13 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added a reviewer: leonardchan. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. We plan on using experimental new pass manager for Fuchsia toolchain. Repository: rC Clang https://reviews.llvm.org/D58214 Files:

[PATCH] D58149: [clang] Make sure C99/C11 features in are provided in C++11

2019-02-13 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D58149#1397382 , @efriedma wrote: > Formally, I don't think C11 is a normative reference for C++11 or C++14, only > C++17 (see [intro.refs] in the standard). Right, this was changed in wg21.link/p0063r3 That being said, we *can*

r353999 - Fix for asan bots

2019-02-13 Thread Leonard Chan via cfe-commits
Author: leonardchan Date: Wed Feb 13 17:07:47 2019 New Revision: 353999 URL: http://llvm.org/viewvc/llvm-project?rev=353999=rev Log: Fix for asan bots Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp URL:

[PATCH] D58149: [clang] Make sure C99/C11 features in are provided in C++11

2019-02-13 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In D58149#1397390 , @jfb wrote: > In D58149#1397382 , @efriedma wrote: > > > Formally, I don't think C11 is a normative reference for C++11 or C++14, > > only C++17 (see [intro.refs] in

[PATCH] D17444: [MSVC] Recognize "static_assert" keyword in C mode

2019-02-13 Thread Nico Weber via Phabricator via cfe-commits
thakis accepted this revision. thakis added a comment. This revision is now accepted and ready to land. Awesome, thanks. Comment at: clang/test/Lexer/keywords_test.cpp:57 +#else +// MS compiler recognizes static_assert in all modes. So should we. +IS_KEYWORD(static_assert);

[PATCH] D58161: Print a note to the called macro when diagnosing err_embedded_directive

2019-02-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354009: Print a note to the called macro when diagnosing err_embedded_directive (authored by nico, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D58157: Stop enabling clang-tools-extra automatically when clang is in LLVM_ENABLE_PROJECTS

2019-02-13 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In D58157#1396072 , @thakis wrote: > In D58157#1395762 , @mehdi_amini > wrote: > > > In D58157#1395716 , @rnk wrote: > > > > > I think we have

[PATCH] D58145: [Sema] Fix a bogus -Wconversion warning

2019-02-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 186774. erik.pilkington marked 2 inline comments as done. erik.pilkington added a comment. I was taking a final look at this, and I noticed that we were sending the wrong arguments to `DiagnoseFloatingImpCast`. The expression argument is meant to be

[PATCH] D57936: [CodeGenObjC] When available, emit a direct call to objc_alloc_init(cls) instead of [objc_alloc(cls) init]

2019-02-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington marked 2 inline comments as done. erik.pilkington added inline comments. Comment at: clang/lib/CodeGen/CGObjC.cpp:459 + llvm::Value *Receiver = + CGF.CGM.getObjCRuntime().GetClass(CGF, ObjTy->getInterface()); + return CGF.EmitObjCAllocInit(Receiver,

r354008 - [NewPM] Add explicit triple to test

2019-02-13 Thread Francis Visoiu Mistrih via cfe-commits
Author: thegameg Date: Wed Feb 13 20:13:00 2019 New Revision: 354008 URL: http://llvm.org/viewvc/llvm-project?rev=354008=rev Log: [NewPM] Add explicit triple to test This prevents warnings like: > warning: overriding the module target triple with x86_64-apple-darwin on macOS. Modified:

r354009 - Print a note to the called macro when diagnosing err_embedded_directive

2019-02-13 Thread Nico Weber via cfe-commits
Author: nico Date: Wed Feb 13 20:13:17 2019 New Revision: 354009 URL: http://llvm.org/viewvc/llvm-project?rev=354009=rev Log: Print a note to the called macro when diagnosing err_embedded_directive Fixes PR40713, see there for the motivation for this. Differential Revision:

[PATCH] D58157: Stop enabling clang-tools-extra automatically when clang is in LLVM_ENABLE_PROJECTS

2019-02-13 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In D58157#1396824 , @rnk wrote: > And, this change really just keeps us at parity with what we had with svn. > We can always revisit the decision to merge the clang tools into clang. This > particular change just gives us

[PATCH] D54978: Move the SMT API to LLVM

2019-02-13 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho updated this revision to Diff 186757. mikhail.ramalho added a comment. Update FindZ3.cmake to do a runtime check of the version. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54978/new/ https://reviews.llvm.org/D54978 Files: clang/CMakeLists.txt

[PATCH] D58157: Stop enabling clang-tools-extra automatically when clang is in LLVM_ENABLE_PROJECTS

2019-02-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D58157#1397274 , @mehdi_amini wrote: > It'd still be nice to identify the end goal with most cfe people (i.e. even > if you land this right now, discussing the desired layout in the monorepo) I sent off

[PATCH] D58120: [Builtins] Treat `bcmp` as a builtin.

2019-02-13 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58120/new/ https://reviews.llvm.org/D58120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D58213: [FileManager] fillRealPathName even if we aren't opening the file

2019-02-13 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. @sammccall I think you touched this part of the code recently in r352079 (revert of r347205). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58213/new/ https://reviews.llvm.org/D58213 ___

[PATCH] D54978: Move the SMT API to LLVM

2019-02-13 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. In D54978#1397316 , @mikhail.ramalho wrote: > I just sent the first prototype of the solution. All the magic happens inside > the `CHECK_CXX_SOURCE_RUNS` call. I think hardcoding the version into the binary is too brittle.

[PATCH] D58204: CMake: Fix stand-alone clang builds since r353268

2019-02-13 Thread Tom Stellard via Phabricator via cfe-commits
tstellar updated this revision to Diff 186769. tstellar added a comment. Updated patch to fix non-standalone builds. There is more refactoring that could be done, but this at least restores functionality to before r353268. I have tested non-standalone builds and standalone builds with and

[PATCH] D58218: Variable auto-init of blocks capturing self after init bugfix

2019-02-13 Thread JF Bastien via Phabricator via cfe-commits
jfb created this revision. jfb added a reviewer: ahatanak. Herald added subscribers: cfe-commits, dexonsmith, jkorous. Herald added a project: clang. Blocks that capture themselves (and escape) after initialization currently codegen wrong because this: bool capturedByInit = Init &&

[PATCH] D58163: [CUDA][HIP] Use device side kernel and variable names when registering them

2019-02-13 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC354004: [CUDA][HIP] Use device side kernel and variable names when registering them (authored by yaxunl, committed by ). Herald added a project: clang. Changed prior to commit:

[PATCH] D58060: Fix diagnostic for addr spaces in static_cast

2019-02-13 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In D58060#1396565 , @Anastasia wrote: > We had discussion related to this with John earlier. And I documented it in > this bug: https://bugs.llvm.org/show_bug.cgi?id=39674 I think we observed something similar to this

[PATCH] D58149: [clang] Make sure C99/C11 features in are provided in C++11

2019-02-13 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Formally, I don't think C11 is a normative reference for C++11 or C++14, only C++17 (see [intro.refs] in the standard). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58149/new/ https://reviews.llvm.org/D58149

[PATCH] D58157: Stop enabling clang-tools-extra automatically when clang is in LLVM_ENABLE_PROJECTS

2019-02-13 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In D58157#1397302 , @rnk wrote: > In D58157#1397274 , @mehdi_amini > wrote: > > > It'd still be nice to identify the end goal with most cfe people (i.e. even > > if you land this

[PATCH] D58216: Support attribute used in member funcs of class templates II

2019-02-13 Thread Rafael Auler via Phabricator via cfe-commits
rafauler created this revision. rafauler added reviewers: rsmith, ldionne, aaron.ballman. Herald added a subscriber: jdoerfert. Herald added a project: clang. As PR17480 describes, clang does not support the used attribute for member functions of class templates. This means that if the member

r354004 - [CUDA][HIP] Use device side kernel and variable names when registering them

2019-02-13 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Feb 13 18:00:09 2019 New Revision: 354004 URL: http://llvm.org/viewvc/llvm-project?rev=354004=rev Log: [CUDA][HIP] Use device side kernel and variable names when registering them __hipRegisterFunction and __hipRegisterVar need to accept device side kernel and variable

[PATCH] D57936: [CodeGenObjC] When available, emit a direct call to objc_alloc_init(cls) instead of [objc_alloc(cls) init]

2019-02-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 186784. erik.pilkington marked an inline comment as done. erik.pilkington added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57936/new/ https://reviews.llvm.org/D57936 Files:

[PATCH] D58218: Variable auto-init of blocks capturing self after init bugfix

2019-02-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1640 // Only initialize a __block's storage: we always initialize the header. -if (emission.IsEscapingByRef) +if (emission.IsEscapingByRef && isa(Loc.getPointer())) Loc =

[PATCH] D58204: CMake: Fix stand-alone clang builds since r353268

2019-02-13 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai accepted this revision. smeenai added a comment. LGTM. There's more clean up that could be done here, but this addresses the immediate issue. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58204/new/ https://reviews.llvm.org/D58204

[PATCH] D57936: [CodeGenObjC] When available, emit a direct call to objc_alloc_init(cls) instead of [objc_alloc(cls) init]

2019-02-13 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/CodeGen/CGObjC.cpp:475-483 case ObjCMessageExpr::Class: { ReceiverType = E->getClassReceiver(); const ObjCObjectType *ObjTy =

[PATCH] D58157: Stop enabling clang-tools-extra automatically when clang is in LLVM_ENABLE_PROJECTS

2019-02-13 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Thanks for starting the thread, Reid. In D58157#1397260 , @mehdi_amini wrote: > Sorry, I don't have time to do archeology for you right now. But this is > beside the point: your patch is changing a 2 years status quo, so my take

[PATCH] D58091: Customize warnings for missing built-in type

2019-02-13 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. I think this warning (-Wbuiltin-requires-header) doesn't really make sense as its own warning. We already have two related (on-by-default) warnings. For declarations: test.c:1:6: warning: incompatible redeclaration of library function 'exit'

[PATCH] D58218: Variable auto-init of blocks capturing self after init bugfix

2019-02-13 Thread JF Bastien via Phabricator via cfe-commits
jfb marked an inline comment as done. jfb added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1640 // Only initialize a __block's storage: we always initialize the header. -if (emission.IsEscapingByRef) +if (emission.IsEscapingByRef && isa(Loc.getPointer()))

[PATCH] D17444: [MSVC] Recognize "static_assert" keyword in C mode

2019-02-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D17444#1397179 , @STL_MSFT wrote: > @rnk I've forwarded this to the compiler front-end and Universal CRT teams. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D17444/new/

[PATCH] D54978: Move the SMT API to LLVM

2019-02-13 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added a comment. Hi guys, I just sent the first prototype of the solution. All the magic happens inside the `CHECK_CXX_SOURCE_RUNS` call. There is still one thing to do: currently, the program is hard-coded to check for version 4.7.1. We should either get it from the

[PATCH] D58149: [clang] Make sure C99/C11 features in are provided in C++11

2019-02-13 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D58149#1397532 , @rsmith wrote: > In D58149#1397499 , @ldionne wrote: > > > In D58149#1397390 , @jfb wrote: > > > > > In D58149#1397382

[PATCH] D58213: [FileManager] fillRealPathName even if we aren't opening the file

2019-02-13 Thread Jan Korous via Phabricator via cfe-commits
jkorous created this revision. jkorous added reviewers: sammccall, arphaman. Herald added subscribers: cfe-commits, kadircet, dexonsmith, ioeric, ilya-biryukov. Herald added a project: clang. This fixes an internal test failure in clangd - ClangdTests.GoToInclude.All rdar://47536127

[PATCH] D58149: [clang] Make sure C99/C11 features in are provided in C++11

2019-02-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D58149#1397499 , @ldionne wrote: > In D58149#1397390 , @jfb wrote: > > > In D58149#1397382 , @efriedma > > wrote: > > > > > Formally, I don't

[PATCH] D58145: [Sema] Fix a bogus -Wconversion warning

2019-02-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Basically LGTM, especially if we need an emergency fix, but please consider addressing my comment before committing since I'd expect it to be straightforward to solve. Comment at: clang/lib/Sema/SemaChecking.cpp:10634 + // warning. + else if

[PATCH] D58163: [CUDA][HIP] Use device side kernel and variable names when registering them

2019-02-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:412 + for (auto & : EmittedKernels) { +llvm::Constant *KernelName = makeConstantString(I.DeviceSideName); llvm::Constant *NullPtr =

[PATCH] D58161: Print a note to the called macro when diagnosing err_embedded_directive

2019-02-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Comment at: clang/lib/Lex/PPMacroExpansion.cpp:497 + Args = ReadMacroCallArgumentList(Identifier, MI, ExpansionEnd); thakis wrote: > rnk wrote: > >

[PATCH] D57984: PR40642: Fix determination of whether the final statement of a statementexpression is a discarded-value expression.

2019-02-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith updated this revision to Diff 186731. rsmith marked 7 inline comments as done. rsmith added a comment. Address review comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57984/new/ https://reviews.llvm.org/D57984 Files: include/clang/AST/Expr.h

[PATCH] D57984: PR40642: Fix determination of whether the final statement of a statementexpression is a discarded-value expression.

2019-02-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/Parse/Parser.h:374 +/// This context is at the top level of a GNU statement expression. +InStmtExpr = 0x4, + aaron.ballman wrote: > It's a bit strange that the previous two enumerators are "Allow"

[PATCH] D17444: [MSVC] Recognize "static_assert" keyword in C mode

2019-02-13 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT added a comment. @rnk I've forwarded this to the compiler front-end and Universal CRT teams. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D17444/new/ https://reviews.llvm.org/D17444 ___

r353965 - [Headers][mips] Add `__attribute__((__mode__(__unwind_word__)))` to the _Unwind_Word / _Unwind_SWord definitions

2019-02-13 Thread Simon Atanasyan via cfe-commits
Author: atanasyan Date: Wed Feb 13 10:27:09 2019 New Revision: 353965 URL: http://llvm.org/viewvc/llvm-project?rev=353965=rev Log: [Headers][mips] Add `__attribute__((__mode__(__unwind_word__)))` to the _Unwind_Word / _Unwind_SWord definitions The rationale of this change is to fix _Unwind_Word

[PATCH] D58189: [clang][Index] Fix usage of IndexImplicitInstantiation

2019-02-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: unittests/Index/IndexTests.cpp:30 +struct Position { + size_t Line; NIT: put all of the decls of a file into an anonymous namespace Repository: rC Clang CHANGES SINCE LAST ACTION

Re: r353976 - [Sema] Delay checking whether objc_designated_initializer is being applied to an init method

2019-02-13 Thread Shoaib Meenai via cfe-commits
Should this be considered for 8.0? It's late in the branch and I don't know how prevalent the issue being fixed is, but it caught my eye. From: cfe-commits on behalf of Erik Pilkington via cfe-commits Reply-To: Erik Pilkington Date: Wednesday, February 13, 2019 at 12:32 PM To:

[PATCH] D58204: CMake: Fix stand-alone clang builds since r353268

2019-02-13 Thread Tom Stellard via Phabricator via cfe-commits
tstellar created this revision. tstellar added reviewers: phosek, andrewrk, smeenai. Herald added subscribers: cfe-commits, mgorny. Herald added projects: clang, LLVM. Handle the case where LLVM_MAIN_SRC_DIR is not set and also use LLVM_CMAKE_DIR for locating installed cmake files rather than

  1   2   >