- Oct 27, 2015
-
-
Nico Weber authored
1. Make the warning more strict in C mode. r172696 added code to suppress warnings from macro expansions in system headers, which checks `SourceMgr.isMacroBodyExpansion(E->IgnoreParens()->getExprLoc())`. Consider this snippet: #define FOO(x) (x) void f(int a) { FOO(a); } In C, the line `FOO(a)` is an `ImplicitCastExpr(ParenExpr(DeclRefExpr))`, while it's just a `ParenExpr(DeclRefExpr)` in C++. So in C++, `E->IgnoreParens()` returns the `DeclRefExpr` and the check tests the SourceLoc of `a`. In C, the `ImplicitCastExpr` has the effect of checking the SourceLoc of `FOO`, which is a macro body expansion, which causes the diagnostic to be skipped. It looks unintentional that clang does different things for C and C++ here, so use `IgnoreParenImpCasts` instead of `IgnoreParens` here. This has the effect of the warning firing more often than previously in C code – it now fires as often as it fires in C++ code. 2. Suppress the warning if it would warn on `UNREFERENCED_PARAMETER`. `UNREFERENCED_PARAMETER` is a commonly used macro on Windows and it happens to uselessly trigger -Wunused-value. As discussed in the thread "rfc: winnt.h's UNREFERENCED_PARAMETER() vs clang's -Wunused-value" on cfe-dev, fix this by special-casing this specific macro. (This costs a string comparison and some fast-path lexing per warning, but the warning is emitted rarely. It fires once in Windows.h itself, so this code runs at least once per TU including Windows.h, but it doesn't run hundreds of times.) http://reviews.llvm.org/D13969 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251441 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251432 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Sanders authored
Summary: This is a follow on to post review comments on revision r248276. Patch by Scott Egerton. Reviewers: vkalintiris, dsanders Subscribers: joerg, rengolin, cfe-commits Differential Revision: http://reviews.llvm.org/D13100 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251430 91177308-0d34-0410-b5e6-96231b3b80d8
-
Artem Belevich authored
Linking options for particular file depend on the option that specifies the file. Currently there are two: * -mlink-bitcode-file links in complete content of the specified file. * -mlink-cuda-bitcode links in only the symbols needed by current TU. Linked symbols are internalized. This bitcode linking mode is used to link device-specific bitcode provided by CUDA. Files are linked in order they are specified on command line. -mlink-cuda-bitcode replaces -fcuda-uses-libdevice flag. Differential Revision: http://reviews.llvm.org/D13913 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251427 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251419 91177308-0d34-0410-b5e6-96231b3b80d8
-
Will Wilson authored
Microsoft connect bug: https://connect.microsoft.com/VisualStudio/feedback/details/1741530 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251415 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251412 91177308-0d34-0410-b5e6-96231b3b80d8
-
Saleem Abdulrasool authored
Expose isMutable via libClang and python bindings. Patch by Jonathan B Coe! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251410 91177308-0d34-0410-b5e6-96231b3b80d8
-
Gabor Horvath authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251407 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Specifically, don't wrap between the {} of an empty constructor if the "}" falls on column 81 and ConstructorInitializerAllOnOneLineOrOnePerLine is set. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251406 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Summary: If this option is set, clang-format will always insert a line wrap, e.g. before the first parameter of a function call unless all parameters fit on the same line. This obviates the need to make a decision on the alignment itself. Use this style for Google's JavaScript style and add some minor tweaks to correctly handle nested blocks etc. with it. Don't use this option for for/while loops. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D14104 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251405 91177308-0d34-0410-b5e6-96231b3b80d8
-
Gabor Horvath authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251404 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
hopefully make bots happy again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251397 91177308-0d34-0410-b5e6-96231b3b80d8
-
Michael Kuperstein authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251396 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251391 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Christopher authored
only one of a group of possibilities. This changes the syntax in the builtin files to represent: , as the and operator | as the or operator The former syntax matches how the backend tablegen files represent multiple subtarget features being required. Updated the builtin and intrinsic headers accordingly for the new syntax. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251388 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
of await_* calls, and AST representation for same. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251387 91177308-0d34-0410-b5e6-96231b3b80d8
-
Xinliang David Li authored
Create undef reference to profile hook symbol when PGO instrumentation is turned on. This allows LLVM to omit emission of hook variable use method for every single module instrumented. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251385 91177308-0d34-0410-b5e6-96231b3b80d8
-
John McCall authored
allow them to be written in certain kinds of user declaration and diagnose on the use-site instead. Also, improve and fix some diagnostics relating to __weak and properties. rdar://23228631 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251384 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Christopher authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251371 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 26, 2015
-
-
Ismail Pazarbasi authored
Summary: In `MismatchingNewDeleteDetector::analyzeInClassInitializer`, if `Field`'s initializer expression is null, lookup the field in implicit instantiation, and use found field's the initializer. Reviewers: rsmith, rtrieu Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D9898 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251335 91177308-0d34-0410-b5e6-96231b3b80d8
-
Gabor Horvath authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251313 91177308-0d34-0410-b5e6-96231b3b80d8
-
Devin Coughlin authored
The regex for -isystem matching is broken. -[D,I,Usystem] matches "-D", "-,", "-I", "-U", "-s" "-y", etc. Besides that, "-isystem /foo" gets interpreted as "-i" with a non-empty value "system" and thus the next "/foo" argument is not read. This patch corrects the regex. This fixes PR13237 <https://llvm.org/bugs/show_bug.cgi?id=13237>. A patch by Peter Wu! Differential Revision: http://reviews.llvm.org/D13800 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251312 91177308-0d34-0410-b5e6-96231b3b80d8
-
Gabor Horvath authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251289 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Before (with spaces in parentheses): void inFunction() { std::function<void( int, int )> fct; } After: void inFunction() { std::function<void( int, int)> fct; } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251284 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 25, 2015
-
-
Michael Kuperstein authored
The MCU psABI calling convention is somewhat, but not quite, like -mregparm 3. In particular, the rules involving structs are different. Differential Revision: http://reviews.llvm.org/D13978 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251224 91177308-0d34-0410-b5e6-96231b3b80d8
-
Devin Coughlin authored
Update ccc-analyzer to forward both -Xclang and its following argument to the the compiler driver. Previously we were dropping -Xclang and forwarding the argument on its own if it matched other forwarding criteria. This caused the argument to be interpreted as a driver rather than a frontend option. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251218 91177308-0d34-0410-b5e6-96231b3b80d8
-
Rafael Espindola authored
Patch by Richard. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251214 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 24, 2015
-
-
NAKAMURA Takumi authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251182 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 23, 2015
-
-
Adrian Prantl authored
I accidentally tested r251120 with assertions disabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251126 91177308-0d34-0410-b5e6-96231b3b80d8
-
Artyom Skrobov authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251124 91177308-0d34-0410-b5e6-96231b3b80d8
-
Adrian Prantl authored
containers. rdar://problem/23196170 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251120 91177308-0d34-0410-b5e6-96231b3b80d8
-
Adrian Prantl authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251116 91177308-0d34-0410-b5e6-96231b3b80d8
-
Davide Italiano authored
The latter seems unsupported (at least) on MinGW and FreeBSD (where I hit this failure). We can't have nice things. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251115 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
Found by asan! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251110 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
This relands r250831 after some fixes to shrink the ParentMap overall with one addtional tweak: nodes with pointer identity (e.g. Decl* and friends) can be store more efficiently so I put them in a separate map. All other nodes (so far only TypeLoc and NNSLoc) go in a different map keyed on DynTypedNode. This further uglifies the code but significantly reduces memory overhead. Overall this change still make ParentMap significantly larger but it's nowhere as bad as before. I see about 25 MB over baseline (pre-r251008) on X86ISelLowering.cpp. If this becomes an issue we could consider splitting the maps further as DynTypedNode is still larger (32 bytes) than a single TypeLoc (16 bytes) but I didn't want to introduce even more complexity now. Differential Revision: http://reviews.llvm.org/D14011 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251101 91177308-0d34-0410-b5e6-96231b3b80d8
-
Xinliang David Li authored
Replaced references to raw strings in instrumentation and coverage code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251072 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 22, 2015
-
-
John McCall authored
Previously, __weak was silently accepted and ignored in MRC mode. That makes this a potentially source-breaking change that we have to roll out cautiously. Accordingly, for the time being, actual support for __weak references in MRC is experimental, and the compiler will reject attempts to actually form such references. The intent is to eventually enable the feature by default in all non-GC modes. (It is, of course, incompatible with ObjC GC's interpretation of __weak.) If you like, you can enable this feature with -Xclang -fobjc-weak but like any -Xclang option, this option may be removed at any point, e.g. if/when it is eventually enabled by default. This patch also enables the use of the ARC __unsafe_unretained qualifier in MRC. Unlike __weak, this is being enabled immediately. Since variables are essentially __unsafe_unretained by default in MRC, the only practical uses are (1) communication and (2) changing the default behavior of by-value block capture. As an implementation matter, this means that the ObjC ownership qualifiers may appear in any ObjC language mode, and so this patch removes a number of checks for getLangOpts().ObjCAutoRefCount that were guarding the processing of these qualifiers. I don't expect this to be a significant drain on performance; it may even be faster to just check for these qualifiers directly on a type (since it's probably in a register anyway) than to do N dependent loads to grab the LangOptions. rdar://9674298 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251041 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
We got this right for Itanium but not MSVC because CGRecordLayoutBuilder was checking if the base's size was zero when it should have been checking the non-virtual size. This fixes PR21040. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251036 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251026 91177308-0d34-0410-b5e6-96231b3b80d8
-