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
Chad Rosier [Fri, 12 Oct 2012 21:37:00 +0000 (21:37 +0000)]
[ms-inline asm] Remove a bunch of parsing code from the front-end, which will be
reimplemented in the AsmParser where it belongs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165825
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 12 Oct 2012 21:17:34 +0000 (21:17 +0000)]
Add missing header from 165821
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165822
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 12 Oct 2012 21:15:50 +0000 (21:15 +0000)]
Sanitize the names of modules determined based on the names of headers
or directories, to make sure that they are identifiers that are not
keywords in any dialect. Fixes <rdar://problem/
12489495>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165821
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Fri, 12 Oct 2012 20:16:26 +0000 (20:16 +0000)]
Remove XFAIL,fix test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165819
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Fri, 12 Oct 2012 20:07:31 +0000 (20:07 +0000)]
XFAIL pending further investigation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165818
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 12 Oct 2012 20:00:44 +0000 (20:00 +0000)]
Fix typo correction of one qualified name to another.
When suggesting "foo::bar" as a correction for "fob::bar" we mistakenly
replaced only "bar" with "foo::bar" producing "fob::foo::bar" which was broken.
This corrects that replacement in as many places as I could find & provides
test cases for all those cases I could find a test case for. There are a couple
that don't seem to be reachable (one looks entirely dead, the other just
doesn't seem to ever get called with a namespace to namespace change).
Review by Richard Smith ( http://llvm-reviews.chandlerc.com/D57 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165817
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Fri, 12 Oct 2012 19:26:17 +0000 (19:26 +0000)]
This patch addresses PR13948.
For 64-bit PowerPC SVR4, an aggregate containing only one
floating-point field (float, double, or long double) must be passed in
a register as though just that field were present. This patch
addresses the issue during Clang code generation by specifying in the
ABIArgInfo for the argument that the underlying type is passed
directly in a register. The included test case verifies flat and
nested structs for the three data types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165816
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Oct 2012 19:16:31 +0000 (19:16 +0000)]
Have scan-view guard against serving up pages outside the root directory.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165815
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Fri, 12 Oct 2012 17:48:40 +0000 (17:48 +0000)]
Change (!ptr != 0) to (!ptr) to make the code more readable.
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165811
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 12 Oct 2012 17:39:59 +0000 (17:39 +0000)]
Handle a "#pragma options align" inside a class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165810
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 12 Oct 2012 17:28:36 +0000 (17:28 +0000)]
Add dump support for comments coming from
overridden symbols. OK'ed off-line by Doug.
// rdar://
12378793
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165807
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 12 Oct 2012 14:25:52 +0000 (14:25 +0000)]
c-index-test.c: /* Use C style comment. */
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165797
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 12 Oct 2012 14:11:32 +0000 (14:11 +0000)]
clang/test/Index/index-module.m: Tweak expressions to fit Win32 paths.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165794
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 12 Oct 2012 14:01:58 +0000 (14:01 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165793
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 12 Oct 2012 05:31:40 +0000 (05:31 +0000)]
[PCH] We only need to record C++ overridden methods once for the canonical decl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165788
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Oct 2012 00:18:19 +0000 (00:18 +0000)]
Conditionally use an integral cast for BodyFarm support for OSAtomicCompareAndSwap if the return type is not a boolean.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165774
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 12 Oct 2012 00:16:50 +0000 (00:16 +0000)]
Track which particular submodule #undef's a macro, so that the actual
#undef only occurs if that submodule is imported.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165773
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 12 Oct 2012 00:02:48 +0000 (00:02 +0000)]
Remove dead code introduced in r165751.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165772
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 11 Oct 2012 23:52:50 +0000 (23:52 +0000)]
search for overridden methods with comment when overriding method
has none of its own. Factor in Doug's comments.
// rdar://
12378793
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165771
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Thu, 11 Oct 2012 23:31:23 +0000 (23:31 +0000)]
Remove pointless classof()'s.
Updates to llvm/Support/Casting.h have rendered these classof()'s
irrelevant.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165770
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Thu, 11 Oct 2012 23:31:18 +0000 (23:31 +0000)]
Add missing classof().
Somewhat troublingly, without this implemented, the check inside
isa_impl<> would silently use the parent's `classof()` when determining
whether it was okay to downcast from the parent to the child!
Bug analysis:
A build failure after removing the parent's `classof()` initially
alerted me to the bug, after which a little bit of thinking and reading
of the code identified the root cause.
The compiler could be made to prevent this bug from happening if there
were a way to ensure that in the code
template <typename To, typename From, typename Enabler = void>
struct isa_impl {
static inline bool doit(const From &Val) {
return To::classof(&Val);
}
};
that `To::classof` is actually inside the class `To`, and not in a base
class. I am not aware of a way to check this in C++. If there is a means
to perform that check, please bring it up on the list and this will be
fixed.
There is a high likelihood that there are other instances of this same
bug in the codebase.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165769
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 11 Oct 2012 22:55:07 +0000 (22:55 +0000)]
Provide a fixit when taking the address of an unqualified member function.
This only applies if the type has a name. (we could potentially do something
crazy with decltype in C++11 to qualify members of unnamed types but that
seems excessive)
It might be nice to also suggest a fixit for "&this->i", "&foo->i",
and "&foo.i" but those expressions produce 'bound' member functions that have
a different AST representation & make error recovery a little trickier. Left
as future work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165763
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 11 Oct 2012 22:48:22 +0000 (22:48 +0000)]
clang/test/Index/index-module.m: Move XFAIL. It was line-number-sensitive.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165762
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 11 Oct 2012 22:33:19 +0000 (22:33 +0000)]
clang/test/Index/index-module.m: Mark it as XFAIL:win32 for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165761
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 11 Oct 2012 22:33:14 +0000 (22:33 +0000)]
clang/test/Index/index-pch-with-module.m: Tweak expressions for win32 pathsep.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165760
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 11 Oct 2012 21:44:41 +0000 (21:44 +0000)]
[ms-inline asm] Remove a bunch of parsing code from the front-end, which will be
reimplemented in the AsmParser where it belongs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165752
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 11 Oct 2012 21:28:29 +0000 (21:28 +0000)]
[ms-inline asm] Lookup the IdentifierInfo using the Idents table and remove the
now unused static helper function.
The test case needs to be remove temporarily until I can better filter memory
operands that aren't actual variable reference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165751
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 11 Oct 2012 21:07:39 +0000 (21:07 +0000)]
Diagnose the expansion of ambiguous macro definitions. This can happen
only with modules, when two disjoint modules #define the same
identifier to different token sequences.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165746
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 11 Oct 2012 20:58:21 +0000 (20:58 +0000)]
Remove OSAtomicChecker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165744
91177308-0d34-0410-b5e6-
96231b3b80d8