]>
granicus.if.org Git - clang/log
Nico Weber [Tue, 6 Nov 2012 05:20:23 +0000 (05:20 +0000)]
Delete an outdated comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167441
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 6 Nov 2012 04:58:01 +0000 (04:58 +0000)]
ARM byval: when type alignment is bigger than ABI alignment, instead of
disabling byval, we set realign to true.
It will perform an aligned alloca, and call memcpy to copy the byval
argument to the local variable.
Change the size threshold back to 64 bytes.
rdar://
12596507
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167440
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 6 Nov 2012 04:20:57 +0000 (04:20 +0000)]
[analyzer] Add symbol escapes logic to the SimpleStreamChecker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167439
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 6 Nov 2012 04:20:54 +0000 (04:20 +0000)]
[analyzer] Remove isWithinInlined. It's been replaced with inTopFrame().
Thanks Jordan.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167438
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 6 Nov 2012 03:41:04 +0000 (03:41 +0000)]
Propagate CharUnits through CGObjCMac.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167437
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 6 Nov 2012 03:38:02 +0000 (03:38 +0000)]
Minor fix to ObjC layout bitmap metadata. Found while I was trying to
refactor the code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167436
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 6 Nov 2012 02:30:30 +0000 (02:30 +0000)]
Classify the INT_MIN/-1 check as -fsanitize=signed-integer-overflow, not as -fsanitize=divide-by-zero.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167433
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 6 Nov 2012 02:12:21 +0000 (02:12 +0000)]
[c-index-test] Do install c-index-test because it's not just for tests,
it's also setup as 'INTERNAL_TOOL'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167432
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 6 Nov 2012 01:51:20 +0000 (01:51 +0000)]
Propagate CharUnits into ObjC CodeGen. No intended functional change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167431
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 6 Nov 2012 01:12:02 +0000 (01:12 +0000)]
Per discussion on cfe-commits, treat -faddress-sanitizer,
-fno-address-sanitizer, -fthread-sanitizer, -fno-thread-sanitizer, and
-fcatch-undefined-behavior as deprecated: produce a warning if they are used
pointing to the corresponding -fsanitize= option. In passing add the missing
'-' to some diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167429
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 6 Nov 2012 00:35:04 +0000 (00:35 +0000)]
[PCH] Take into account the 'include' source location of a SM_SLOC_BUFFER_ENTRY.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167426
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 6 Nov 2012 00:35:02 +0000 (00:35 +0000)]
[PCH] Write out the ClassTemplateDecl::Common::InjectedClassNameType type
reference instead of relying on computing it.
In general, if storage is no issue, it is preferable to deserialize info from
the PCH instead of trying to recompute it after the PCH was loaded.
The incentive to change this now was due to r155303 changing how friend template
classes in dependent contexts are handled; such classes can now be chained to
a previous template class but the computed InjectedClassNameType may be different
due to the extra template parameters from the dependent context.
The new handling requires more investigation but, in the meantime, writing out
InjectedClassNameType fixes PCH issue in rdar://
12627738 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167425
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 5 Nov 2012 23:58:27 +0000 (23:58 +0000)]
Have the parser initialize Sema before it consumes the first
token. This is important because the first token could actually be
after an #include that triggers a module import, which might use
either Sema or the AST consumer before it would have been initialized.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167423
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 5 Nov 2012 23:30:26 +0000 (23:30 +0000)]
Split the instrinsic header wmmintrin.h into AES and PCLMUL parts, so
that we can model them as separate submodules.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167420
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 5 Nov 2012 22:53:33 +0000 (22:53 +0000)]
Frontend: Add support for reading named pipes as the main file.
- The whole {File,Source}Manager is built around wanting to pre-determine the
size of files, so we can't fit this in naturally. Instead, we handle it like
we do STDIN, where we just replace the main file contents upfront.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167419
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Mon, 5 Nov 2012 22:50:26 +0000 (22:50 +0000)]
Delete comment I forgot to delete in my last change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167418
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Mon, 5 Nov 2012 22:49:03 +0000 (22:49 +0000)]
Use Richard's BE_THE_HEADER trick to simplify a test. No intended behavior change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167417
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 5 Nov 2012 22:42:46 +0000 (22:42 +0000)]
ARM byval: when type alignment is bigger than ABI alignment, we can't guarantee
the type alignment of the byval argument. This patch will disable byval in this case,
it also increases the size threshold for turning on byval.
A backend fix will be attempted.
rdar://
12596507
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167416
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 5 Nov 2012 22:21:05 +0000 (22:21 +0000)]
Use the individual -fsanitize=<...> arguments to control which of the UBSan
checks to enable. Remove frontend support for -fcatch-undefined-behavior,
-faddress-sanitizer and -fthread-sanitizer now that they don't do anything.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167413
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 5 Nov 2012 22:04:41 +0000 (22:04 +0000)]
Add -fsanitize=<sanitizers> argument to driver and frontend, and add
-fno-sanitize=<sanitizers> argument to driver. These allow ASan, TSan, and the
various UBSan checks to be enabled and disabled separately. Right now, the
different modes can't be combined, but the intention is that combining UBSan
and the other sanitizers will be permitted in the near future.
Currently, the UBSan checks will all be enabled if any of them is; that will be
fixed by the next patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167411
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 5 Nov 2012 21:48:12 +0000 (21:48 +0000)]
Rename LangOptions members for address sanitizer and thread sanitizer from
*Sanitizer to Sanitize* in preparation for later patches.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167405
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 5 Nov 2012 20:41:30 +0000 (20:41 +0000)]
Fix module map for SSE4a builtins
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167399
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 5 Nov 2012 20:11:10 +0000 (20:11 +0000)]
Make cpuid.h actually work with -std=c99 <rdar://problem/
12552716 >.
While we're here, extend the module map to cover most of the
newly-added instrinsic headers. Only wmmintrin.h is missing, because
it needs to be split into AES/PCLMUL subheaders (as a separate commit).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167398
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 5 Nov 2012 19:45:09 +0000 (19:45 +0000)]
Hash the various compiler version, target, preprocessor, and
header-search options into the module hash. We're just using
ADT/Hashing.hpp for this, which isn't as cryptographically strong as
I'd like, but it'll do. If someone contributes (say) and MD4
implementation, we'd happily switch to that.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167397
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Mon, 5 Nov 2012 19:13:42 +0000 (19:13 +0000)]
On PowerPC64, integer arguments and return values need to be sign- or
zero-extended to 64 bits. This information is currently provided to
the back end by setting "signext" or "zeroext" attributes. However,
this is done only for integer types *smaller* than i32, not for i32
itself. This causes clang to generate code violating the ABI, which
results in a failure of the tramp3d-v4 test case (due to calling a
system library routine without ABI-required extension).
This patch implements custom versions of classifyArgumentType and
classifyReturnType for PPC64_SVR4_ABIInfo, which are the same as the
default versions except that they also classify "int" and "unsigned int"
as types needing extending. This fixed tramp3d-v4 on PowerPC64.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167393
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 5 Nov 2012 18:14:34 +0000 (18:14 +0000)]
Tests for 32bit version of block ivar layout metadata.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167387
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 5 Nov 2012 16:58:00 +0000 (16:58 +0000)]
[analyzer] Move convenience REGISTER_*_WITH_PROGRAMSTATE to CheckerContext.h
As Anna pointed out, ProgramStateTrait.h is a relatively obscure header,
and checker writers may not know to look there to add their own custom
state.
The base macro that specializes the template remains in ProgramStateTrait.h
(REGISTER_TRAIT_WITH_PROGRAMSTATE), which allows the analyzer core to keep
using it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167385
91177308 -0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Mon, 5 Nov 2012 05:32:00 +0000 (05:32 +0000)]
Our style for diagnostic messages is to not include a trailing dot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167379
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 4 Nov 2012 20:21:54 +0000 (20:21 +0000)]
Put the usage-directive inside the nearest namespace or TU decl. We don't want
to have UsingDirectiveDecl inside anything other than those two.
No user-visible functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167376
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sun, 4 Nov 2012 18:19:40 +0000 (18:19 +0000)]
Fixes liftime of captured block variables in mrr mode, per John's feedback, as
well as couple of tests which were not being excercised because of TYPOs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167374
91177308 -0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sun, 4 Nov 2012 05:08:08 +0000 (05:08 +0000)]
Test case for r167363.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167369
91177308 -0d34-0410-b5e6-
96231b3b80d8
Seth Cantrell [Sat, 3 Nov 2012 23:56:43 +0000 (23:56 +0000)]
only truncate source lines in text diagnostics when
the ellipsis is shorter than the text it replaces
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167364
91177308 -0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sat, 3 Nov 2012 22:29:05 +0000 (22:29 +0000)]
Support interleaving of other pragmas with FP_CONTRACT at the beginning of a
compound statement.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167363
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Sat, 3 Nov 2012 22:10:18 +0000 (22:10 +0000)]
Address review comments for r167358: explicitly check for CK_BitCast instead of
checking against a blacklist.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167362
91177308 -0d34-0410-b5e6-
96231b3b80d8
Seth Cantrell [Sat, 3 Nov 2012 21:21:17 +0000 (21:21 +0000)]
don't step into the middle of multibyte sequences
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167361
91177308 -0d34-0410-b5e6-
96231b3b80d8
Seth Cantrell [Sat, 3 Nov 2012 21:21:14 +0000 (21:21 +0000)]
fix bug in SourceColumnMap::startOfPreviousColumn
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167360
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 3 Nov 2012 20:58:26 +0000 (20:58 +0000)]
Escape trigraphs in unittest.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167359
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Sat, 3 Nov 2012 16:07:49 +0000 (16:07 +0000)]
Handle CK_NullToPointer casts in -Wtype-safety properly. Fixes PR14249.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167358
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Sat, 3 Nov 2012 14:24:57 +0000 (14:24 +0000)]
Remove a const_cast by propagating constness to the member function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167357
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 3 Nov 2012 13:59:36 +0000 (13:59 +0000)]
StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp: Appease msvc.
0 (as nullptr) is incompatible to pointer in type matching on msvc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167355
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 3 Nov 2012 03:36:51 +0000 (03:36 +0000)]
Add a proper algorithm to compute accurate source ranges for diagnostics with
caret locations and source ranges in macros. Makes ranges more accurate
in some cases, and fixes an assertion failure.
Fixes <rdar://problem/
12472249 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167353
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Sat, 3 Nov 2012 02:54:20 +0000 (02:54 +0000)]
[analyzer] Run remove dead on end of path.
This will simplify checkers that need to register for leaks. Currently,
they have to register for both: check dead and check end of path.
I've modified the SymbolReaper to consider everything on the stack dead
if the input StackLocationContext is 0.
(This is a bit disruptive, so I'd like to flash out all the issues
asap.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167352
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Sat, 3 Nov 2012 02:54:16 +0000 (02:54 +0000)]
[analyzer] add LocationContext::inTopFrame() helper.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167351
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Sat, 3 Nov 2012 02:54:11 +0000 (02:54 +0000)]
[analyzer] Refactor: Remove Pred from NodeBuilderContext.
Node builders should manage the nodes, not the context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167350
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sat, 3 Nov 2012 00:27:14 +0000 (00:27 +0000)]
Simplify these tests again, now that we're past the version skew.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167346
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Fri, 2 Nov 2012 23:49:35 +0000 (23:49 +0000)]
[analyzer] Convert SimpleStreamChecker over to CallEvent.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167340
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Fri, 2 Nov 2012 23:49:33 +0000 (23:49 +0000)]
[analyzer] CheckerDocumentation: Change examples for PreStmt and PostStmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167339
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Fri, 2 Nov 2012 23:49:29 +0000 (23:49 +0000)]
[analyzer] Add some convenience accessors to CallEvent, and use them.
These are CallEvent-equivalents of helpers already accessible in
CheckerContext, as part of making it easier for new checkers to be written
using CallEvent rather than raw CallExprs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167338
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Fri, 2 Nov 2012 23:49:24 +0000 (23:49 +0000)]
[analyzer] isCLibraryFunction: check that the function is at TU-scope.
Also, Decls already carry a pointer to the ASTContext, so there's no need
to pass an extra argument to the predicate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167337
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 2 Nov 2012 23:40:00 +0000 (23:40 +0000)]
Emit debug info for C++ struct definitions as DW_TAG_structure_type (instead of class_type).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167336
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 2 Nov 2012 23:07:41 +0000 (23:07 +0000)]
Avoid version skew by making ObjC strict metadata tests resilient to new field.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167332
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 2 Nov 2012 22:51:18 +0000 (22:51 +0000)]
objective-C mrr block. Block variable layout metadata in
mrr mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167331
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 2 Nov 2012 22:18:44 +0000 (22:18 +0000)]
When code-completing don't disable the preprocessing record if modules are enabled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167325
91177308 -0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Fri, 2 Nov 2012 21:44:32 +0000 (21:44 +0000)]
Thread safety analysis: Fixed ICE caused by double delete when late parsed
attributes are attached to function declarations nested inside a class method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167321
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Fri, 2 Nov 2012 21:41:42 +0000 (21:41 +0000)]
Fix test cases I broken when fixing grammar in diagnostic message.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167320
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Fri, 2 Nov 2012 21:33:17 +0000 (21:33 +0000)]
Fix grammar of diagnostic message.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167319
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Fri, 2 Nov 2012 21:30:07 +0000 (21:30 +0000)]
[analyzer] Test SimpleStream on the buildbot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167317
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Fri, 2 Nov 2012 21:30:04 +0000 (21:30 +0000)]
[analyzer] Factor SimpleStreamChecker pulling out isLeaked().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167316
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 2 Nov 2012 20:49:01 +0000 (20:49 +0000)]
Fix debug tag type of forward declarations of struct/class in C++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167308
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 2 Nov 2012 20:41:30 +0000 (20:41 +0000)]
Improve x86 android support:
* -Bsymbolic must be added for x86 as well.
* Default CPU name also set to 'core2' for x86 android.
Patch by Edwin Vane.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167307
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 2 Nov 2012 20:34:30 +0000 (20:34 +0000)]
Add test for link flags added by -fcatch-undefined-behavior.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167306
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 2 Nov 2012 20:32:19 +0000 (20:32 +0000)]
Add -lpthread when building with Ubsan on Linux, in preparation for making libclang-rt.ubsan pull in sanitizer_common, which in turn depends on pthreads.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167305
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 2 Nov 2012 17:50:53 +0000 (17:50 +0000)]
Update test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167301
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 2 Nov 2012 17:48:49 +0000 (17:48 +0000)]
Move -Wimplicit-retain-self to be off-by-default until we can evaluate
more how noisy it is.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167300
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 2 Nov 2012 09:59:12 +0000 (09:59 +0000)]
clang/test/CodeGen/bitfield-promote.c: Add explicit triple for now. It has been failing for big endian targets, for example, ppc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167293
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 2 Nov 2012 09:59:06 +0000 (09:59 +0000)]
clang/test/CodeGen/bitfield-promote.c: FileCheck-ize.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167292
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 2 Nov 2012 03:35:13 +0000 (03:35 +0000)]
Delete lines which do nothing from DiagnosticGroups.td.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167281
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 2 Nov 2012 02:31:22 +0000 (02:31 +0000)]
[libclang] Correct how the index inside the local preprocessed entities array
is getting converted to a global PreprocessedEntityID.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167280
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 2 Nov 2012 02:14:44 +0000 (02:14 +0000)]
Add missing diagnostic group to format string warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167279
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 2 Nov 2012 02:04:01 +0000 (02:04 +0000)]
analyzer-plugin/MainCallChecker.cpp: Fixup corresponding to r167275.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167278
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Fri, 2 Nov 2012 01:54:42 +0000 (01:54 +0000)]
[analyzer] Convert some of the harder cases over to ProgramStateTrait macros.
Add FIXMEs for the traits visible from multiple translation units.
Currently the macros hide their key types in an anonymous namespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167277
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Fri, 2 Nov 2012 01:54:06 +0000 (01:54 +0000)]
[analyzer] Use nice macros for the common ProgramStateTraits (map, set, list).
Also, move the REGISTER_*_WITH_PROGRAMSTATE macros to ProgramStateTrait.h.
This doesn't get rid of /all/ explicit uses of ProgramStatePartialTrait,
but it does get a lot of them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167276
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Fri, 2 Nov 2012 01:53:40 +0000 (01:53 +0000)]
[analyzer] Rename 'EmitReport' to 'emitReport'.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167275
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 2 Nov 2012 01:40:23 +0000 (01:40 +0000)]
Tweak wording and add diagnostic groups to misc diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167274
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 2 Nov 2012 01:34:28 +0000 (01:34 +0000)]
Change diagnostics for enums with fixed underlying type so in C++98 mode, we cite C++11.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167273
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Fri, 2 Nov 2012 01:31:03 +0000 (01:31 +0000)]
Insert interception point onStartOfTranslationUnit.
Often users of the ASTMatchers want to add tasks that are done once per
translation unit, for example, cleaning up caches. Combined with the
interception point for the end of source file one can add to the factory
creation, this covers the cases we've seen users need.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167271
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Fri, 2 Nov 2012 01:08:58 +0000 (01:08 +0000)]
When finding a '(' after '::', emit error with hint to remove '(' and matching
')', if found. Don't crash.
Fixes PR11852.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167268
91177308 -0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 1 Nov 2012 23:55:47 +0000 (23:55 +0000)]
Update the front end to use minsize attribute
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167266
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 1 Nov 2012 22:30:59 +0000 (22:30 +0000)]
Simplify: replace getContext().getLangOpts() with just getLangOpts().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167261
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 1 Nov 2012 22:16:43 +0000 (22:16 +0000)]
Clean up misapplication of diff.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167260
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 1 Nov 2012 22:15:34 +0000 (22:15 +0000)]
Split emission of -ftrapv checks and -fcatch-undefined-behavior checks into
separate functions, since they share essentially no code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167259
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 1 Nov 2012 22:13:39 +0000 (22:13 +0000)]
Remove divison-by-zero checks from -ftrapv. These checks were incompatible with
g++'s -ftrapv, failed to call the -ftrapv overflow handler, and are still
available under -fcatch-undefined-behavior.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167258
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Thu, 1 Nov 2012 21:29:28 +0000 (21:29 +0000)]
Fix the template type diffing to handle integral template arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167252
91177308 -0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Thu, 1 Nov 2012 20:26:42 +0000 (20:26 +0000)]
Silence -Wformat on platforms where uint64_t is unsigned long.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167249
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 1 Nov 2012 18:32:55 +0000 (18:32 +0000)]
objective-C block meta-data. This patch completes meta-data
generation for captured block variables in arc mode. This includes
inlined version of the meta-data when it can be done. It also includes
severat tests. This is wip. // rdar://
12184410 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167241
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 1 Nov 2012 17:52:58 +0000 (17:52 +0000)]
Make the FilenameRange of the InclusionDirective callback more accurate,
preserve the macro location of the range end if the filename came from a macro.
Patch by Kim Gräsman!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167239
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 1 Nov 2012 14:32:20 +0000 (14:32 +0000)]
Fix an incorrect assert, the LHS can be an LValue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167232
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 1 Nov 2012 07:22:08 +0000 (07:22 +0000)]
-fcatch-undefined-behavior: Start checking loads and stores for null pointers.
We want the diagnostic, and if the load is optimized away, we still want to
trap it. Stop checking non-default address spaces; that doesn't work in
general.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167219
91177308 -0d34-0410-b5e6-
96231b3b80d8
Gregory Szorc [Thu, 1 Nov 2012 05:46:30 +0000 (05:46 +0000)]
[clang.py] Add Cursor.get_arguments()
Patch provided by Matthias Kleine <matthias_kleine@gmx.de>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167216
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 1 Nov 2012 04:30:05 +0000 (04:30 +0000)]
Remove first argument from Arg::getValue; it's been unused since r105760.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167211
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 1 Nov 2012 03:48:49 +0000 (03:48 +0000)]
Remove CompilerInvocation::toArgs and clang -cc1test mode. These were untested
and apparently unused (and since they are untested, they're presumably also
broken).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167210
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 1 Nov 2012 02:01:34 +0000 (02:01 +0000)]
[libclang] Introduce clang_Cursor_getReceiverType which returns the CXType for
the receiver of an ObjC message expression.
rdar://
12578643
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167201
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 1 Nov 2012 01:47:02 +0000 (01:47 +0000)]
clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h: Appease msvc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167199
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Thu, 1 Nov 2012 01:05:39 +0000 (01:05 +0000)]
[analyzer] Optimize assumeDual by assuming constraint managers are consistent.
Specifically, if adding a constraint makes the current system infeasible,
assume the constraint is false, instead of attempting to add its negation.
In +Asserts builds we will still assert that at least one state is feasible.
Patch by Ryan Govostes!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167195
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 1 Nov 2012 00:59:15 +0000 (00:59 +0000)]
[lit] For the "case-insensitive-filesystem" make sure to create the test temporary file
in the test output directory.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167193
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Thu, 1 Nov 2012 00:25:15 +0000 (00:25 +0000)]
[analyzer] Fix typo in r167186.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167189
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 1 Nov 2012 00:20:00 +0000 (00:20 +0000)]
clang/test/Index/code-completion-skip-bodies.cpp: Add XFAIL while investigating.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167188
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Thu, 1 Nov 2012 00:18:41 +0000 (00:18 +0000)]
[analyzer] Minor cleanup in SimpleStreamChecker's class definition.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167187
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Thu, 1 Nov 2012 00:18:27 +0000 (00:18 +0000)]
[analyzer] Rename ConditionTruthVal::isTrue to isConstrainedTrue.
(and the same for isFalse)
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167186
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 31 Oct 2012 23:55:28 +0000 (23:55 +0000)]
Correctly reject gotos in function-level try blocks. PR14225.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167184
91177308 -0d34-0410-b5e6-
96231b3b80d8