[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&view=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] 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 S

[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 https://li

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

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&view=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] 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 incl

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

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

[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 tools/clang/test/

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

[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: D:/Format/llvm/tools/clang/lib/Format/WhitespaceManager.cpp:68

[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 # 0xa

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

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

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

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&view=rev > Log: > Refactor the way we handle d

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&view=rev Log: [Analyzer] Crash fix for FindLastStoreBRVisitor FindLastStoreBRVisitor tries to find the first node in the exploded graph where the current value was as

[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&id=186625#toc Repository: r

[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 https://rev

[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` an

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&view=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. Loo

[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: D:/Format/llvm/tools/cla

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

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

[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] 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 test/Sema/dllexport

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

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

[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 lib/AST/De

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

[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 186651. courbet added a comment. Update tests after constness changes. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58120/new/ https://reviews.llvm.org/D58120 Files: include/clang/Basic/Builtins.def lib/AST/Decl.cpp l

[PATCH] D57855: [analyzer] Reimplement checker options

2019-02-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added a comment. Since my changes are very invasive towards `CheckerRegistry` in general, I might `clang-format` the whole thing, and make the code follow the coding guidelines. Thanks for the review! CHANGES SINCE LAST ACTION https://rev

[PATCH] D58152: [Sema] Delay checking whether objc_designated_initializer is being applied to an init method

2019-02-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:5252 const ParsedAttr &AL) { + auto *Ctx = D->getDeclContext(); + Please don't use `auto` here. Comment at: clang/lib

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

2019-02-13 Thread Goran Mitrovic via Phabricator via cfe-commits
gmit created this revision. gmit added a reviewer: alexfh. gmit added a project: clang-tools-extra. Herald added a project: clang. Herald added a subscriber: cfe-commits. isRawStringLiteral will read from memory randomly if double quote is not found. Repository: rCTE Clang Tools Extra https:/

[PATCH] D58179: [OpenCL][PR40707] Allow OpenCL C types in C++ mode

2019-02-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: svenvh. Herald added subscribers: ebevhan, yaxunl. Allow all OpenCL types to be parsed in C++ mode. I plan to enable more tests but they are currently failing for different reasons. This commit makes sure images can be used as they are

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

2019-02-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman 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, + It's a bit strange that the previous two enumerators are "Allow" and this is "In".

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

2019-02-13 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: lib/Sema/SemaDecl.cpp:11370 +// In Microsoft C++ mode, a const variable defined in namespace scope has +// external linkage by default if the variable is declared with Even in unnamed namespaces? CHANGES SINCE

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

2019-02-13 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. 1. test? 2. please always upload all patches with full context (`-U9`) 3. The diff is malformed. `RawStringLiteralCheck.cpp` is not on the top level of the repo Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58178/new/

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

2019-02-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaDecl.cpp:11370 +// In Microsoft C++ mode, a const variable defined in namespace scope has +// external linkage by default if the variable is declared with thakis wrote: > Even in unnamed name

[PATCH] D58186: Sync some doc changes ClangFormatStyleOptions.rst with doc comments in `Format.h`

2019-02-13 Thread Ronald Wampler via Phabricator via cfe-commits
rdwampler created this revision. rdwampler added reviewers: eugene, sylvestre.ledru, djasper. Herald added a project: clang. Herald added a subscriber: cfe-commits. These changes were corrected directly in ClangFormatStyleOptions.rst (llvm-svn: 350192 and llvm-svn: 351976) but these sections can

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

2019-02-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: rsmith. aaron.ballman added a comment. 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 -- but I wonder why those diagnostics are happening

[PATCH] D58185: [clangd] Handle unresolved scope specifier when fixing includes.

2019-02-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, jdoerfert, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. ioeric updated this revision to Diff 186674. ioeric added a comment. ioeric edited the summary of

[PATCH] D58185: [clangd] Handle unresolved scope specifier when fixing includes.

2019-02-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 186674. ioeric added a comment. - Remove unintended change. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58185/new/ https://reviews.llvm.org/D58185 Files: clangd/IncludeFixer.cpp unittests/clangd/Diagnostic

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&view=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, -mcode-object-v

[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 clang-tools-extra/tags/RELEASE_800/rc2/clang-tidy/modernize/RawStringLiteralChec

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

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

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

[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) asse

[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 "^.*Z3_FULL_VERSI

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

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

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

2019-02-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D58091#1396397 , @jdoerfert wrote: > In D58091#1396382 , @aaron.ballman > wrote: > > > - but I wonder why those diagnostics are happening in the first place. It > > seems like the

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

2019-02-13 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D57898#1395953 , @glider wrote: > ... which happily skips the padding. I don't think padding is an issue right now. It's valid to either initialize it or not. It is slightly unfortunate to lose the information about padding (whic

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

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

[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. FWIW I think I've almost finished handling the padding: https://reviews.llvm.org/D58188 I haven't checked whether it works correctly with padding in custom initializers (like `struct s local = {1, 2}`), but TEST_UNINIT and TEST_BRACES are covered already. CHANGES SINCE

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

2019-02-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. Herald added subscribers: cfe-commits, jdoerfert, arphaman. Herald added a project: clang. Indexing context was skipping explicit template instantiations as well. This patch makes sure it only skips implicit ones. Repository: rC Clang https://reviews.llvm.org/D

[PATCH] D58122: Restore Check for Unreachable Exit Block in -Winfinite-recursion

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

[PATCH] D58190: [clangd] Add tests for template specializations

2019-02-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Herald added a project: clang. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D58190 Files: unittests/clangd/XRefsTests.cpp Index: unittests/clangd/XRefsT

r353957 - [AArch64] Support reserving arbitrary general purpose registers

2019-02-13 Thread Petr Hosek via cfe-commits
Author: phosek Date: Wed Feb 13 09:28:47 2019 New Revision: 353957 URL: http://llvm.org/viewvc/llvm-project?rev=353957&view=rev Log: [AArch64] Support reserving arbitrary general purpose registers This is a follow up to D48580 and D48581 which allows reserving arbitrary general purpose registers

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

2019-02-13 Thread Brian Cain via Phabricator via cfe-commits
bcain added a comment. > Are you sure it is unrelated? Very nearly positive, I applied the patch to our downstream trunk and the assertion is encountered in a target-specific pass. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58091/new/ https://

[PATCH] D56305: [AArch64] Support reserving arbitrary general purpose registers

2019-02-13 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC353957: [AArch64] Support reserving arbitrary general purpose registers (authored by phosek, committed by ). Changed prior to commit: https://reviews.llvm.org/D56305?vs=186583&id=186687#toc Repository:

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

2019-02-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Rather than sending a review, probably the reproducible case as to why it crash is more important, it might be better to write up your bug at https://bugs.llvm.org/ I tried to repoduce this and I can't see how I could make a string literal without a double quote

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

2019-02-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/Parse/Parser.h:382 + + friend ParsedStmtContext operator|(ParsedStmtContext A, ParsedStmtContext B) { +return ParsedStmtContext((unsigned)A | (unsigned)B); We have `llvm/ADT/BitmaskEnum.h`, which defi

[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#1396435 , @gmit wrote: > ? 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 t

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

2019-02-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D58060#1396416 , @ebevhan wrote: > 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 explicitl

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

2019-02-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Only have a few NITs, will dig deeper into the change tomorrow. Added @arphaman too as an owner of the index library. Alex, feel free to reassign if you're the wrong person to take a look at this Comment at: unittests/Index/IndexTests.cpp:31 +str

r353960 - [Driver] Pass +reserve-x25 to backend if -ffixed-x25 is specified

2019-02-13 Thread Petr Hosek via cfe-commits
Author: phosek Date: Wed Feb 13 10:01:23 2019 New Revision: 353960 URL: http://llvm.org/viewvc/llvm-project?rev=353960&view=rev Log: [Driver] Pass +reserve-x25 to backend if -ffixed-x25 is specified This was accidentally omitted in r353957 breaking the Clang test. Modified: cfe/trunk/lib/Dri

[PATCH] D58134: [Analysis] -Wunreachable-code shouldn't fire on the increment of a foreach loop

2019-02-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58134/new/ https://reviews.llvm.org/D58134 ___

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&view=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_

[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. In D58178#1396523 , @MyDeveloperDay wrote: > I tried to repoduce this and I can't see how I could make a string literal > without a double quote, if it still failed with the current code it might > suggest the matcher matched somet

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

2019-02-13 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. The code is crashing here because the loop in `computeBlockInfo` is trying to capture a variable that is captured by reference by the enclosing lambda as if it were captured by value. This is the type of VT: LValueReferenceType 0x1138008c0 'struct derp &' `-RecordT

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

2019-02-13 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:128 + unsigned Flags) override { +DeviceVars.push_back(VarInfo{&Var, getDeviceSideName(VD), Flags}); } Nit: `VarInfo` is not needed. Compiler should be able to infer it

[PATCH] D58165: [Headers][mips] Add `__attribute__((__mode__(__unwind_word__)))` to the _Unwind_Word / _Unwind_SWord definitions

2019-02-13 Thread Simon Atanasyan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC353965: [Headers][mips] Add `__attribute__((__mode__(__unwind_word__)))` to the… (authored by atanasyan, committed by ). Changed prior to commit: https://reviews.llvm.org/D58165?vs=186585&id=186694#toc

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

2019-02-13 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I think the root of the problem is that `BlockDecl` knows the captured variable but doesn't know the type of the capture. The type of the variable and the type of the capture can be different if the block is nested inside a lambda or another block, which is why `CI.has

[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 https://reviews.llvm.org/

[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
hctim created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Provided rule of thumb percentage chances of miss for 4 and 8 bit tag sizes. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D58195 Files: clang/docs/HardwareAssistedAddressSani

[PATCH] D57662: [clang-tidy] Parallelise clang-tidy-diff.py

2019-02-13 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Any comments? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57662/new/ https://reviews.llvm.org/D57662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

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

2019-02-13 Thread Stefan Teleman via Phabricator via cfe-commits
steleman added a comment. Hi Renato, Thank you very much for the comments. I will create a new changeset incorporating your comments, and then re-submit. I will also add a Diagnostic for SVML and X86/X86_64. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53928/n

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

2019-02-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 186699. Anastasia added a comment. Herald added a subscriber: javed.absar. - Changed the diagnostic for binding reference and combined with existing similar one. That affected more tests however. - Changed comment explaining address space behavior in the re

r353969 - Re-enable the test disabled in r353836 and hopefully make it pass in gcc builds

2019-02-13 Thread Nico Weber via cfe-commits
Author: nico Date: Wed Feb 13 11:04:26 2019 New Revision: 353969 URL: http://llvm.org/viewvc/llvm-project?rev=353969&view=rev Log: Re-enable the test disabled in r353836 and hopefully make it pass in gcc builds Argument evaluation order is different between gcc and clang, so pull out the Builder

Re: r353729 - Attempt to pacify bots more after r353718 and r353725

2019-02-13 Thread Nico Weber via cfe-commits
I re-enabled the test in r353969, hopefully it'll pass when using gcc as host too this time. On Tue, Feb 12, 2019 at 9:10 AM Mikael Holmén wrote: > > > On 2/12/19 1:41 PM, Nico Weber wrote: > > Thanks for reporting that this depends on the host compiler. > > > > I disabled the test again in r353

[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. I'll ship this. @eli.friedman I think this is your playground -- if you want any changes to happen post-review, please LMK and I will gladly cooperate. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58149/new/ https://reviews.llvm.org/D58

r353970 - [clang] Make sure C99/C11 features in are provided in C++11

2019-02-13 Thread Louis Dionne via cfe-commits
Author: ldionne Date: Wed Feb 13 11:08:01 2019 New Revision: 353970 URL: http://llvm.org/viewvc/llvm-project?rev=353970&view=rev Log: [clang] Make sure C99/C11 features in are provided in C++11 Summary: Previously, those #defines were only provided in C or when GNU extensions were enabled. We ne

[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
This revision was automatically updated to reflect the committed changes. Closed by commit rC353970: [clang] Make sure C99/C11 features in are provided in C++11 (authored by ldionne, committed by ). Changed prior to commit: https://reviews.llvm.org/D58149?vs=186544&id=186703#toc Repo

[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 &&I : EmittedKernels) { +llvm::Constant *KernelName = makeConstantString(I.DeviceSideName); llvm::Constant *NullPtr = llvm::ConstantPointerNull::g

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

2019-02-13 Thread James Y Knight via Phabricator via cfe-commits
jyknight accepted this revision. jyknight added a comment. This revision is now accepted and ready to land. Looks reasonable to me. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58120/new/ https://reviews.llvm.org/D58120 ___

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

2019-02-13 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added inline comments. This revision is now accepted and ready to land. Comment at: lib/CodeGen/CGCUDANV.cpp:412 + for (auto &&I : EmittedKernels) { +llvm::Constant *KernelName = makeConstantString(I.DeviceSideName); llvm::Constant *NullP

[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 &&I : EmittedKernels) { +llvm::Constant *KernelName = makeConstantString(I.DeviceSideName); llvm::Constant *NullPtr = llvm::ConstantPointerNull::g

[PATCH] D54978: Move the SMT API to LLVM

2019-02-13 Thread Brian Rzycki via Phabricator via cfe-commits
brzycki added a comment. In D54978#1395562 , @mikhail.ramalho wrote: > Hi @brzycki, but isn't it exactly what we want? I mean, if we try to > cross-compile and it fails for any reason (non-native library, wrong > version), then Z3_FOUND shouldn't be set

[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 updated this revision to Diff 186711. yaxunl added a comment. Revised by Artem's comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58163/new/ https://reviews.llvm.org/D58163 Files: include/clang/AST/ASTContext.h lib/AST/ASTContext.cpp lib/CodeGen/CGCUDANV.cpp lib/C

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

2019-02-13 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. Thank you. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58163/new/ https://reviews.llvm.org/D58163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[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#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 car

[PATCH] D58152: [Sema] Delay checking whether objc_designated_initializer is being applied to an init method

2019-02-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:7258-7267 + // Do this check after processing D's attributes because the attribute + // objc_method_family can change whether the given method is in the init + // family, and it can be applied a

  1   2   >