Douglas Gregor [Thu, 18 Oct 2012 05:31:06 +0000 (05:31 +0000)]
Start factoring the on-disk records for an AST file into a control
block, which stores information about how the AST file to generated,
from the AST block, which stores the actual serialized AST. The
information in the control block should be enough to determine whether
the AST file is up-to-date and compatible with the current translation
unit, and reading it should not cause any side effects that aren't
easy to undo. That way, we can back out from an attempt to read an
incompatible or out-of-date AST file.
Note that there is still more factoring to do. In particular,
information about the source files used to generate the AST file
(along with their time stamps, sizes, etc.) still resides in the
source manager block.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166166
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 18 Oct 2012 05:23:42 +0000 (05:23 +0000)]
Revert svn r165741 "Add TargetTransformInfo to the clang driver."
Nadav's llvm change r165665 caused problems with an LTO bootstrap of clang,
so I'm reverting it for now, along with follow-on patches like this one.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166164
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 18 Oct 2012 01:38:53 +0000 (01:38 +0000)]
libclang/CXComment.cpp: Fix abuse of StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166163
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 18 Oct 2012 00:44:17 +0000 (00:44 +0000)]
Tests for DR1507.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166162
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 18 Oct 2012 00:17:05 +0000 (00:17 +0000)]
[libclang] Invoke a ppIncludedFile callback when indexing implicit module imports.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166161
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 18 Oct 2012 00:16:56 +0000 (00:16 +0000)]
[libclang] Add a test for annotation of module headers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166160
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 17 Oct 2012 23:55:38 +0000 (23:55 +0000)]
Update comment to match DR1502.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166158
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 17 Oct 2012 23:52:07 +0000 (23:52 +0000)]
DR1535: only potentially-evaluated typeid expressions are disallowed in constant
expressions, not *any* typeid on a polymorphic class type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166156
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 17 Oct 2012 23:45:39 +0000 (23:45 +0000)]
Fix -Woverloaded-virtual when the using statement refers to a base declaration of a virtual function.
GCC and Clang both do not warn on:
struct a { virtual void func(); };
struct b: a { virtual void func(); void func(int); };
struct c: b { void func(int); using b::func; };
but if the "using" was using a::func GCC would still remain silent where Clang
would warn. This change makes Clang consistent with GCC's existing behavior.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166154
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 17 Oct 2012 23:31:46 +0000 (23:31 +0000)]
DR1528: C++11 doesn't allow repeated cv-qualifiers in declarators after all.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166152
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 17 Oct 2012 23:25:40 +0000 (23:25 +0000)]
XFAIL these tests until I can figure out what is going on on
other platforms.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166151
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 17 Oct 2012 23:19:22 +0000 (23:19 +0000)]
Adds couple of missing warning flags so warnings can be turned
off. // rdar://
12501960
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166150
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 17 Oct 2012 23:07:52 +0000 (23:07 +0000)]
Add -std=c++1y argument, for *highly* experimental C++14 support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166139
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 17 Oct 2012 21:58:03 +0000 (21:58 +0000)]
[Doc parsing]: This patch adds <Declaration> tag to
XML comment for declarations which pretty-prints
declaration. I had to XFAIL one test annotate-comments.cpp.
This test is currently unmaintainable as written.
Dmitri G., can you see what we can do about this test.
We should change this test such that adding a new tag does not wreck
havoc to the test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166130
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Wed, 17 Oct 2012 21:09:26 +0000 (21:09 +0000)]
[analyzer] CmpRuns: cleanup APIs, allow processing of plists with no
clang_version, fix the compare routine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166129
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Wed, 17 Oct 2012 19:35:44 +0000 (19:35 +0000)]
[analyzer] When binding to a ParenExpr, bind to its inner expression instead.
This actually looks through several kinds of expression, such as
OpaqueValueExpr and ExprWithCleanups. The idea is that binding and lookup
should be consistent, and so if the environment needs to be modified later,
the code doing the modification will not have to manually look through these
"transparent" expressions to find the real binding to change.
This is necessary for proper updating of struct rvalues as described in
the previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166121
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Wed, 17 Oct 2012 19:35:37 +0000 (19:35 +0000)]
[analyzer] Create a temporary region when accessing a struct rvalue.
In C++, rvalues that need to have their address taken (for example, to be
passed to a function by const reference) will be wrapped in a
MaterializeTemporaryExpr, which lets CodeGen know to create a temporary
region to store this value. However, MaterializeTemporaryExprs are /not/
created when a method is called on an rvalue struct, even though the 'this'
pointer needs a valid value. CodeGen works around this by creating a
temporary region anyway; now, so does the analyzer.
The analyzer also does this when accessing a field of a struct rvalue.
This is a little unfortunate, since the rest of the struct will soon be
thrown away, but it does make things consistent with the rest of the
analyzer.
This allows us to bring back the assumption that all known 'this' values
are Locs. This is a revised version of r164828-9, reverted in r164876-7.
<rdar://problem/
12137950>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166120
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 17 Oct 2012 18:47:30 +0000 (18:47 +0000)]
Move -Wint-to-pointer-cast from -Wall to -Wmost to group it with more things.
Addressing feedback on r166039 given by Matt Beaumont-Gay.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166118
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 17 Oct 2012 17:37:17 +0000 (17:37 +0000)]
Revert r158009 since there are some uses of artificial functions in
debug info.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166109
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Wed, 17 Oct 2012 13:35:36 +0000 (13:35 +0000)]
Fix tests, which accidentally matched implicit code on specific
platforms to make buildbots happy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166100
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 17 Oct 2012 09:40:16 +0000 (09:40 +0000)]
Remove an unneeded flag from the bitrig driver tests.
Based loosely on a patch from David Hill.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166096
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Wed, 17 Oct 2012 08:52:59 +0000 (08:52 +0000)]
First version of matchers for Types and TypeLocs.
Review: http://llvm-reviews.chandlerc.com/D47
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166094
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 17 Oct 2012 06:45:09 +0000 (06:45 +0000)]
Update test FIXME: The '[]' in 'delete []' is never part of a lambda.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166090
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 17 Oct 2012 04:53:31 +0000 (04:53 +0000)]
Set a special flag in class metadata when an Objective-C class
has ivars that require destruction, but none that require anything
except zero-initialization. This is common in ARC and (when true
throughout a class hierarchy) permits the elimination of an
unnecessary message-send during allocation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166088
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 17 Oct 2012 04:53:23 +0000 (04:53 +0000)]
Organize and rename the magic constants for class flags.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166087
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 17 Oct 2012 02:28:37 +0000 (02:28 +0000)]
At -O0, prefer objc_storeStrong with a null new value to the
combination of a load+objc_release; this is generally better
for tools that try to track why values are retained and
released. Also use objc_storeStrong when copying a block
(again, only at -O0), which requires us to do a preliminary
store of null in order to compensate for objc_storeStrong's
assign semantics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166085
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 17 Oct 2012 00:47:58 +0000 (00:47 +0000)]
Implement C++ 10.3p16 - overrides involving deleted functions must match.
Only deleted functions may override deleted functions and non-deleted functions
may only override non-deleted functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166082
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 17 Oct 2012 00:34:34 +0000 (00:34 +0000)]
"'Might as well make it static const.' -- John McCall" -- Michael Scott
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166080
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 17 Oct 2012 00:11:35 +0000 (00:11 +0000)]
Fix the handling of target options in our unit tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166079
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 16 Oct 2012 23:55:06 +0000 (23:55 +0000)]
Move test to a more appropriate place.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166078
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 16 Oct 2012 23:45:15 +0000 (23:45 +0000)]
Fix pretty-printing for variables declared in a condition. Patch by Grzegorz Jablonski.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166073
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 16 Oct 2012 23:40:58 +0000 (23:40 +0000)]
Serialize TargetOptions into an AST file, and make sure that we keep
target options around so they can be accessed at any point (rather
than keeping them transient).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166072
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 16 Oct 2012 23:30:16 +0000 (23:30 +0000)]
DR1492: In a definition of a destructor, the exception specification must be
explicitly specified iff it was specified in the declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166071
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 16 Oct 2012 22:56:05 +0000 (22:56 +0000)]
PR13684: Emit vtable entries for deleted functions as __cxa_deleted_function.
This is consistent/interoperable with GCC 4.7 (& __cxa_deleted_function isn't
present in 4.4 - not sure when it got added, but you'll need something with
that function available for this to work).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166069
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 16 Oct 2012 22:40:48 +0000 (22:40 +0000)]
ARM ABI: fix testing case arm-abi-vector.c by using [[VAR]]
rdar://
12439123
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166066
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Tue, 16 Oct 2012 22:30:41 +0000 (22:30 +0000)]
Add pnaclcall convention to Native Client targets.
Because PNaCl bitcode must be target-independent, it uses some
different bitcode representations from other targets (e.g. byval and
sret for structures). This means that without additional type
information, it cannot meet some native ABI requirements for some
targets (e.g. passing structures containing unions by value on
x86-64). To allow generation of code which uses the correct native
ABIs, we also support triples such as x86_64-nacl, which uses
target-dependent IR (as opposed to le32-nacl, which uses byval and
sret).
To allow interoperation between the two types of code, this patch adds
a calling convention attribute to be used in code compiled with the
target-dependent triple, which will generate code using the le32-style
bitcode. This calling convention does not need to be explicitly
supported in the backend because it determines bitcode representation
rather than native conventions (the backend just needs to undersand
how to handle byval and sret for the Native Client OS).
This patch implements __attribute__((pnaclcall)) to generate calls in
bitcode according to the le32 bitcode conventions, an attribute which
is accepted by any Native Client target, but issues a warning
otherwise.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166065
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 16 Oct 2012 22:02:26 +0000 (22:02 +0000)]
XFAIL this testing case to recover buildbot
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166064
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 16 Oct 2012 21:55:39 +0000 (21:55 +0000)]
[ms-inline asm] Move some logic around to simplify the interface between the
front-end and the AsmParser. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166063
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 16 Oct 2012 21:03:19 +0000 (21:03 +0000)]
Test pure virtual vtable entries in the Itanium ABI.
(original functionality committed in r99807, refactored in r160373)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166059
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 16 Oct 2012 20:25:33 +0000 (20:25 +0000)]
Note deleted functions when dumping vtables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166056
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 16 Oct 2012 19:51:48 +0000 (19:51 +0000)]
ARM ABI: fix ABI alignment issues in varargs.
We generalize r166040 to handle ABI alignment issues for all types.
rdar://
12439123
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166052
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 16 Oct 2012 19:36:39 +0000 (19:36 +0000)]
[analyzer] Expose clang_version in CmpRuns
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166048
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 16 Oct 2012 19:36:37 +0000 (19:36 +0000)]
[analyzer] Ivar Invalidation: track ivars in continuations and
@implementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166047
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 16 Oct 2012 19:18:39 +0000 (19:18 +0000)]
ARM ABI: passing illegal vector types as varargs.
We expand varargs in clang and the call site is handled in the back end, it is
hard to match exactly how illegal vectors are handled in the backend. Therefore,
we legalize the illegal vector types in clang:
if (Size <= 32), legalize to i32.
if (Size == 64), legalize to v2i32.
if (Size == 128), legalize to v4i32.
if (Size > 128), use indirect.
rdar://
12439123
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166043
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 16 Oct 2012 19:01:37 +0000 (19:01 +0000)]
ARM ABI: fix ABI alignment issues when passing legal vector types as varargs.
We create an aligned temporary space and copy the content over from ap.cur to
the temporary space. This is necessary if the natural alignment of the type is
greater than the ABI alignment.
rdar://
12439123
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166040
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 16 Oct 2012 18:53:14 +0000 (18:53 +0000)]
Implement GCC's -Wint-to-pointer-cast.
This implementation doesn't warn on anything that GCC doesn't warn on with the
exception of templates specializations (GCC doesn't warn, Clang does). The
specific skipped cases (boolean, constant expressions, enums) are open for
debate/adjustment if anyone wants to demonstrate that GCC is being overly
conservative here. The only really obvious false positive I found was in the
Clang regression suite's MPI test - apparently MPI uses specific flag values in
pointer constants. (eg: #define FOO (void*)~0)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166039
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Tue, 16 Oct 2012 17:45:27 +0000 (17:45 +0000)]
When using a symbol with attribute weakref, search for it first and
don't try the normal GetOrCreateLLVM. The latter could drop the weak
atrtibute on the second reference, if there is no explicit declaration
of the aliasee.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166032
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 16 Oct 2012 17:08:11 +0000 (17:08 +0000)]
Minor tweak to last patch along with a test case.
// rdar://
12491143
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166030
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 16 Oct 2012 16:21:20 +0000 (16:21 +0000)]
fixes an objc crash involving objc bool literal on
hopelessly poorly written code after spewing several
errors. // rdar://
12491143
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166025
91177308-0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Tue, 16 Oct 2012 15:11:55 +0000 (15:11 +0000)]
GNUstep runtime version default to 1.6, generate correct property attribute
metadata.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166023
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 16 Oct 2012 07:22:28 +0000 (07:22 +0000)]
Transform pattern:
if (CGM.getModuleDebugInfo())
DebugInfo = CGM.getModuleDebugInfo()
into a call:
maybeInitializeDebugInfo();
This is a simplification for a possible future fix of PR13942.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166019
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 16 Oct 2012 05:23:44 +0000 (05:23 +0000)]
Use the Attributes::get method which takes an AttrVal value directly to simplify the code a bit. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166010
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Tue, 16 Oct 2012 00:47:25 +0000 (00:47 +0000)]
[analyzer] ObjCContainersASTChecker: minor cleanup and an extra test case.
Follow-up to r165838, which fixed a potential crash.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166002
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Mon, 15 Oct 2012 22:48:21 +0000 (22:48 +0000)]
[analyzer] CmpRuns - cleaned up the API, added relative path getter
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165995
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Mon, 15 Oct 2012 22:48:19 +0000 (22:48 +0000)]
[analyzer] Embed the analyzer version into the plist output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165994
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Mon, 15 Oct 2012 22:48:17 +0000 (22:48 +0000)]
[analyzer] Enhance the error message.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165993
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Mon, 15 Oct 2012 22:48:14 +0000 (22:48 +0000)]
[analyzer] Do not warn on direct ivar assignments within copy methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165992
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 15 Oct 2012 22:23:53 +0000 (22:23 +0000)]
Un-revert r164907 and r164902 (+ follow-ups), 10.6 build fix to follow.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165988
91177308-0d34-0410-b5e6-
96231b3b80d8
Abramo Bagnara [Mon, 15 Oct 2012 21:08:58 +0000 (21:08 +0000)]
Fixed CXXNamedCast right paren location propagation to instantiations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165977
91177308-0d34-0410-b5e6-
96231b3b80d8
Abramo Bagnara [Mon, 15 Oct 2012 21:07:44 +0000 (21:07 +0000)]
Fixed LabelDecl source range.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165976
91177308-0d34-0410-b5e6-
96231b3b80d8
Abramo Bagnara [Mon, 15 Oct 2012 21:06:42 +0000 (21:06 +0000)]
Fixed ClassTemplateSpecializationDecl source range.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165975
91177308-0d34-0410-b5e6-
96231b3b80d8
Abramo Bagnara [Mon, 15 Oct 2012 21:05:46 +0000 (21:05 +0000)]
Fixed FunctionTypeLoc range for trailing return type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165974
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 15 Oct 2012 20:57:52 +0000 (20:57 +0000)]
Fixes location of overriding declaration with no comment
of their own.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165972
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Mon, 15 Oct 2012 20:37:01 +0000 (20:37 +0000)]
Revert r164907 and r164902 (+ follow-ups). They broke building on 10.6.
See PR14013.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165962
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Oct 2012 20:36:26 +0000 (20:36 +0000)]
Move the Attributes::Builder outside of the Attributes class and into its own class named AttrBuilder. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165961
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 15 Oct 2012 19:56:10 +0000 (19:56 +0000)]
[ms-inline asm] Rework the front-end to use the API introduced in r165946.
-The front-end now builds a single assembly string and feeds it to the
AsmParser. The front-end iterates on a per statement basis by calling the
ParseStatement() function. Please note, the calling of ParseStatement() and
and any notion of MCAsmParsedOperands will be sunk into the MC layer in the
near future. I plan to expose more basic APIs such as getClobbers, etc.
-The enumeration of the AsmString expressions have been reworked to use SMLocs
rather than assembly Pieces, which were being parsed in the front-end.
-The test case, t8(), was modified due to r129223. I'll have to find a way to
work around things such as these.
Sorry for the large commit, but breaking this in multiple smaller commits proved
too irritating.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165957
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 15 Oct 2012 18:58:50 +0000 (18:58 +0000)]
structured document comment: patch to provide comment for overriding function
template when comment is comming from overridden declaration.
// rdar://
12378793
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165953
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 15 Oct 2012 16:45:32 +0000 (16:45 +0000)]
Teach TargetInfo to hold on to the TargetOptions with which it was
created.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165943
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 15 Oct 2012 14:22:56 +0000 (14:22 +0000)]
[asan] make AddressSanitizer to be a FunctionPass instead of ModulePass. clang part: for FunctionPass we need to run asan at a different point, otherwise it will run before inlining
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165937
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 15 Oct 2012 13:12:24 +0000 (13:12 +0000)]
Only report first error when no compilation database is found.
Review: http://llvm-reviews.chandlerc.com/D62
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165933
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Oct 2012 07:31:59 +0000 (07:31 +0000)]
Use enum values instead of magic numbers for indexing into the attribute list.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165925
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 15 Oct 2012 06:28:11 +0000 (06:28 +0000)]
Introduce the notion of excluded headers into the module map
description. Previously, one could emulate this behavior by placing
the header in an always-unavailable submodule, but Argyrios guilted me
into expressing this idea properly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165921
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Oct 2012 04:47:45 +0000 (04:47 +0000)]
Attributes Rewrite
Convert the uses of the Attributes class over to the new format. The
Attributes::get method call now takes an LLVM context so that the attributes
object can be uniquified and stored.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165918
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 15 Oct 2012 00:23:07 +0000 (00:23 +0000)]
At -O0, emit an @llvm.trap() call at the end of a value-returning function which
fails to return a value, to make debugging this issue easier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165914
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 14 Oct 2012 19:50:53 +0000 (19:50 +0000)]
Make sure temporary files are deleted when recovering from a crash when compiling modules.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165911
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 14 Oct 2012 19:21:21 +0000 (19:21 +0000)]
Delete temporary output files when an error occurs during PCH reading.
This reduces the spam make test leaves behind in /tmp. The assert isn't
particularly useful because it's not run with -disable-free (the default when
using the clang driver) but should cover all -cc1 tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165910
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 14 Oct 2012 11:50:50 +0000 (11:50 +0000)]
Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165905
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 14 Oct 2012 08:54:39 +0000 (08:54 +0000)]
Remove operator cast method in favor of querying with the correct method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165900
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 14 Oct 2012 03:28:14 +0000 (03:28 +0000)]
Use the Builder to create the stack alignment attribute.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165888
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sat, 13 Oct 2012 22:30:41 +0000 (22:30 +0000)]
"Implement" codegen support for __noop().
Eli discovered that __noop's sema behavior also needs some love. I filed
PR14081 for that and intend to improve it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165886
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sat, 13 Oct 2012 21:56:05 +0000 (21:56 +0000)]
Simplify. Suggestion by Sean Silva.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165885
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Sat, 13 Oct 2012 05:05:20 +0000 (05:05 +0000)]
[analyzer] Remove the "direct bindings only" Environment lookup.
This was only used by OSAtomicChecker and makes it more
difficult to update values for expressions that the environment
may look through instead (it's not the same as IgnoreParens).
With this gone, we can have bindExpr bind to the inner
expression that getSVal will find.
Groundwork for <rdar://problem/
12137950>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165866
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Sat, 13 Oct 2012 05:05:13 +0000 (05:05 +0000)]
[analyzer] Remove unneeded 'inlineCall' checker callback.
I believe the removed assert in CheckerManager says it best:
InlineCall is a special hacky callback to allow intrusive
evaluation of the call (which simulates inlining). It is
currently only used by OSAtomicChecker and should go away
at some point.
OSAtomicChecker has gone away; inlineCall can now go away as well!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165865
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Sat, 13 Oct 2012 00:26:22 +0000 (00:26 +0000)]
Update for r165858.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165859
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 12 Oct 2012 23:32:10 +0000 (23:32 +0000)]
[ms-inline asm] Remove a bunch of parsing code from the front-end.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165851
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 12 Oct 2012 23:32:00 +0000 (23:32 +0000)]
Add TargetInfo for r600.
Patch by Tom Stellard.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165850
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 12 Oct 2012 23:29:20 +0000 (23:29 +0000)]
Make -mms-bitfields behave consistently.
Patch by Jeremiah Zanin.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165849
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 12 Oct 2012 22:57:06 +0000 (22:57 +0000)]
-fcatch-undefined-behavior: Trap undefined behavior due to conversions to or
from a floating-point type where the source value is not in the range of
representable values of the destination type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165843
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Oct 2012 22:56:45 +0000 (22:56 +0000)]
Move assertion to not crash tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165842
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Oct 2012 22:56:42 +0000 (22:56 +0000)]
Silence static analyzer issue by documenting that in this context
that a DeclRefExpr can never return a null decl. We possibly should
hoist this into getDecl() itself.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165841
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Oct 2012 22:56:40 +0000 (22:56 +0000)]
Silence null dereference warnings by documenting context-specific
invariants using assertions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165840
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Oct 2012 22:56:38 +0000 (22:56 +0000)]
Further harden checking that scan-view isn't serving up pages outside
the server root.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165839
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Oct 2012 22:56:36 +0000 (22:56 +0000)]
Fix potential crash in ObjCContainersChecker by properly validating
the number of arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165838
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Oct 2012 22:56:33 +0000 (22:56 +0000)]
Silence dead store warning. It is conceptually possible we will
add more code that references SourceFile, so removing the dead store
doesn't seem appropriate for the long term.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165837
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Oct 2012 22:56:31 +0000 (22:56 +0000)]
Fix potential null deference in CFG printer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165836
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Oct 2012 22:56:26 +0000 (22:56 +0000)]
Remove dead store.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165835
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 12 Oct 2012 22:53:52 +0000 (22:53 +0000)]
Update for r165833.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165834
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 12 Oct 2012 22:45:14 +0000 (22:45 +0000)]
Fix -ast-print for uses of operator->.
Patch by Grzegorz Jablonski.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165832
91177308-0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Fri, 12 Oct 2012 21:49:04 +0000 (21:49 +0000)]
Fix warnings introduced by r165826.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165829
91177308-0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Fri, 12 Oct 2012 21:38:12 +0000 (21:38 +0000)]
Thread-safety analysis: support multiple thread-safety attributes on
declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165826
91177308-0d34-0410-b5e6-
96231b3b80d8