Commit Graph

12103 Commits

Author SHA1 Message Date
Chandler Carruth 08d0491006 Hack in a workaround for PR11082 until we have a proper fix. This
un-breaks every glib-dependent compile with Clang.

I'm not sure this is even the best workaround, so suggestions welcome.

llvm-svn: 141381
2011-10-07 18:40:27 +00:00
Richard Smith 779b8b0f33 Remove FIXME obsoleted by change r141279 for PR11067.
llvm-svn: 141351
2011-10-07 03:16:33 +00:00
John McCall 0710e551ef Record layout requires not just a definition, but a complete
definition.  Assert this.  Change IR generation to not try to
aggressively emit the IR translation of a record during its
own definition.  Fixes PR10912.

llvm-svn: 141350
2011-10-07 02:39:22 +00:00
Ted Kremenek 171969c8c2 r141345 also fixed a -Wuninitialized bug where loop conditions were not always flagged as being uninitialized. Addresses <rdar://problem/9432305>.
llvm-svn: 141346
2011-10-07 00:52:56 +00:00
Ted Kremenek f8fd4d4962 Fix infinite loop in -Wuninitialized reported in PR 11069.
llvm-svn: 141345
2011-10-07 00:42:48 +00:00
Fariborz Jahanian 9cd57a7061 objc: Improve on diagnostic when atomic proeprty is synthesized
on one accessor and user-provide with another.

llvm-svn: 141343
2011-10-06 23:47:58 +00:00
Argyrios Kyrtzidis c281c96675 Implicitly assume that a ObjC category to an unavailable interface is also unavailable;
only give an 'unavailable' error on the @implementation of the category. rdar://10234078

llvm-svn: 141335
2011-10-06 23:23:27 +00:00
Argyrios Kyrtzidis 9321ad3f97 When using an unavailable/deprecated interface Foo inside Foo's interface/implementation
don't emit unavailable errors.

llvm-svn: 141334
2011-10-06 23:23:20 +00:00
Eli Friedman 0dfb889575 Support for C1x _Atomic specifier (see testcase). This is primarily being committed at the moment to help support C++0x <atomic>, but it should be a solid base for implementing the full specification of C1x _Atomic.
Thanks to Jeffrey Yasskin for the thorough review!

llvm-svn: 141330
2011-10-06 23:00:33 +00:00
Chad Rosier 557ee03c8a [driver] Fix test case for Windows due to fallout from r141202+r141205.
llvm-svn: 141322
2011-10-06 22:05:26 +00:00
Ted Kremenek b7531d622d [static analyzer] Fix crash in LiveVariables and Environment::getSVal() when analyzing C++ pointer-to-member calls. Fixes <rdar://problem/10243398>.
llvm-svn: 141312
2011-10-06 20:53:28 +00:00
Peter Collingbourne fa4d6033a3 CUDA: IR generation support for device stubs
llvm-svn: 141304
2011-10-06 18:51:56 +00:00
Fariborz Jahanian 565ed7a4c1 objc++: For atomic properties of c++ class objec typet, appropriate
operator= is called. Issue a warning for non-trivial case until
runtime support is provided. // rdar://6137845

llvm-svn: 141302
2011-10-06 18:38:18 +00:00
Peter Collingbourne a9455ec9f8 CUDA: add -fcuda-is-device flag
This frontend-only flag is used by the IR generator to determine
whether to filter CUDA declarations for the host or for the device.

llvm-svn: 141301
2011-10-06 18:29:46 +00:00
Peter Collingbourne fe88342240 CUDA: IR generation support for kernel call expressions
llvm-svn: 141300
2011-10-06 18:29:37 +00:00
Peter Collingbourne 5bad4afa2f CUDA: set proper calling conventions for PTX
llvm-svn: 141296
2011-10-06 16:49:54 +00:00
Richard Smith 43a87fe86a PR11067: A definition of a constexpr static variable doesn't need an initializer if the in-class declaration had one. Such a declaration must be initialized by a constant expression.
llvm-svn: 141279
2011-10-06 09:21:12 +00:00
Erik Verbruggen 2e657ffd8e Added CXAvailability_NotAccessible to indicate that a declaration is available, but not accessible from the current code completion context.
llvm-svn: 141278
2011-10-06 07:27:49 +00:00
Argyrios Kyrtzidis cddafd3969 [libclang] Introduce clang_findReferencesInFile which accepts a cursor, a file,
and a callback and finds all identifier references of the cursor in the file.

rdar://7948304

llvm-svn: 141277
2011-10-06 07:00:54 +00:00
Ted Kremenek 540017e54e Use a sidetable in ASTContext for ParmVarDecls whose index exceeds the 8 bits reserved for that value in VarDecl. Fixes PR 10538.
llvm-svn: 141273
2011-10-06 05:00:56 +00:00
Peter Collingbourne 485b80fecc OpenCL: add a non-standard extension, cl_clang_storage_class_specifiers,
which enables support for C99 storage-class specifiers.

This extension is intended to be used by implementations to implement
OpenCL C built-in functions.

llvm-svn: 141271
2011-10-06 03:01:00 +00:00
Peter Collingbourne 6a0e48c746 OpenCL: disallow '#pragma OPENCL EXTENSION all : enable', per OpenCL 1.1 9.1
llvm-svn: 141270
2011-10-06 03:00:50 +00:00
Ivan Krasin 31f7411bfc Add -Wlanguage-extension-token option for ext_token_used warning.
llvm-svn: 141268
2011-10-06 02:46:34 +00:00
Eric Christopher fab289a47d When constructing debug information for synthesized variables for the
non-fragile ABI we may not be able to lay out the type and the debugger
would ignore us even if we did put in the offset. Go ahead and just
put any value there and don't look up the offset since it may not exist.

rdar://10210157

llvm-svn: 141261
2011-10-06 00:31:18 +00:00
Ted Kremenek f3e3f6645e Fix major regression in RetainCountChecker. DefaultSummaries were not being used when they were meant to be. Fixes <rdar://problem/10241614>.
llvm-svn: 141250
2011-10-05 23:54:29 +00:00
Argyrios Kyrtzidis a7324ede34 Fix crash when using archaic protocol, rdar://10238337
llvm-svn: 141215
2011-10-05 21:28:06 +00:00
Daniel Dunbar 096ed290a1 Driver & AST: Implement support for -fpack-struct and -fpack-struct= command
line options.
 - <rdar://problem/10120602>, PR9631

llvm-svn: 141211
2011-10-05 21:04:55 +00:00
Argyrios Kyrtzidis 78181b4b45 Fix the rewriter, rdar://10234024.
llvm-svn: 141201
2011-10-05 19:37:56 +00:00
Douglas Gregor 4c362d5310 Expose more statement, expression, and declaration kinds in libclang,
from Manuel Holtgrewe!

llvm-svn: 141200
2011-10-05 19:00:14 +00:00
Justin Holewinski 38031978b5 PTX: Set proper calling conventions for PTX in OpenCL mode.
llvm-svn: 141193
2011-10-05 17:58:44 +00:00
Chandler Carruth e276b3662b Use the InstalledDir correctly, and test it correctly as well. =/ Should
have noticed this previously, sorry.

llvm-svn: 141167
2011-10-05 06:38:03 +00:00
Chandler Carruth cf59bc5939 Teach Clang to cope with GCC installations that have unusual patch
"versions". Currently, these are just dropped on the floor, A concrete
version number will always win out.

llvm-svn: 141159
2011-10-05 03:09:51 +00:00
Chandler Carruth f7e0ecb65d Implement the feature I was originally driving toward when I started
this saga. Teach the driver to detect a GCC installed along side Clang
using the existing InstalledDir support in the Clang driver. This makes
a lot of Clang's behavior more automatic when it is installed along side
GCC.

Also include the first test cases (more to come, honest) which test both
the install directory behavior, and the version sorting behavior to show
that we're actually searching for the best candidate GCC installation
now.

llvm-svn: 141145
2011-10-05 01:01:57 +00:00
Fariborz Jahanian 48c69106e4 c: assignment/init of a function pointer whose function(s)
return to one which does not return (has noreturn attribute) 
should warn as it is an unsafe assignment. // rdar://10095762
c++ already handles this. This is the c version.

llvm-svn: 141141
2011-10-05 00:05:34 +00:00
Douglas Gregor b0e6c8a350 Don't allow an rvalue reference to bind to the result of a calling a
conversion function whose result type is an lvalue reference. The
initialization code already handled this properly, but overload
resolution was allowing the binding. Fixes PR11003 /
<rdar://problem/10233078>.

llvm-svn: 141137
2011-10-04 23:59:32 +00:00
Daniel Dunbar 2fba0979fe Basic/Diagnostics: Apparently, #pragma ... diagnostic is intended to override
the command line options (at least according to GCC's documentation). GCC 4.2
didn't appear to actually do this, but it seems like that has been fixed in
later release, so we will follow the docs.

llvm-svn: 141119
2011-10-04 21:17:24 +00:00
Fariborz Jahanian f2a7b0eade objc: Turn diagnostic on property type mismatch in
continuation class into warning. // rdar://10231514

llvm-svn: 141100
2011-10-04 18:44:26 +00:00
Ted Kremenek f58dbb038c Place diagnostic warn_atomic_property_rule under a -W flag. Fixes <rdar://problem/10230631>.
llvm-svn: 141089
2011-10-04 15:53:53 +00:00
Ted Kremenek edadecdb36 Place diagnostic warn_ownin_getter_rule under a -W flag. Fixes <rdar://problem/10230626>.
llvm-svn: 141088
2011-10-04 15:50:00 +00:00
Ted Kremenek 472a3c1237 Place diagnostic ext_predef_outside_function under a -W flag. Fixes <rdar://problem/10226192>.
llvm-svn: 141087
2011-10-04 15:41:53 +00:00
Ted Kremenek 8c748fb7f8 Revert r141060. We should NEVER add new warnings that aren't guarded by flag.
This reverts commit 5383d065241b18e84232bc50d81523f2058ea62b.

llvm-svn: 141077
2011-10-04 14:48:38 +00:00
John McCall ff61303bd0 Mark calls to objc_retainBlock that don't result from casts
to id so that we can still optimize them appropriately.

llvm-svn: 141064
2011-10-04 06:23:45 +00:00
Bob Wilson 8ecdb9b33a Specify -ccc-clang-archs for le32 targets which may not be supported by default.
llvm-svn: 141062
2011-10-04 05:18:19 +00:00
Argyrios Kyrtzidis 52f53fb303 Improve location fidelity of objc decls.
-Add the location of the class name to all objc container decls, not just ObjCInterfaceDecl.
-Make objc decls consistent with the rest of the NamedDecls and have getLocation() point to the
 class name, not the location of '@'.

llvm-svn: 141061
2011-10-04 04:48:02 +00:00
Chad Rosier b047fed5cd Update testcase for r141053+r141055.
llvm-svn: 141060
2011-10-04 04:42:31 +00:00
Fariborz Jahanian ed1933b02b objc arc: Suppress certain arc diagnostics on unavailable
functions. // rdar://10186536

llvm-svn: 141037
2011-10-03 22:11:57 +00:00
Abramo Bagnara e398e60611 Fixed exapnsion range for # and ##.
llvm-svn: 141012
2011-10-03 18:39:03 +00:00
Fariborz Jahanian 082a6a14a5 objc++: Accessing explicit property of reference type need
not bind to a temporary. Fixes //rdar://10188258

llvm-svn: 141009
2011-10-03 17:58:21 +00:00
Rafael Espindola 70107f989c Propagate __attribute__((returns_twice)) from C to IL.
llvm-svn: 141002
2011-10-03 14:59:42 +00:00
Chandler Carruth adf23a400d Test a multilib setup on a 64-bit host. This is the far more common
configuration, although the test still stubs out more directories than
are necessary or common in order to exercise all of the lookup paths
observed with upstream GCC.

This finishes testing the distribution-independent and
GCC-installation-independent parts of the library path search logic.
More testing is still needed for the triple detection, GCC-installation
detection, and handling distributions with unusual configurations.

llvm-svn: 141000
2011-10-03 09:08:26 +00:00
Chandler Carruth 2356b2c307 Enable generic multilib support on 32bit hosts. Previously this was only
enabled for debian hosts, which is quite odd. I think all restriction on
when Clang attempts to use a multilib installation should go away. Clang
is fundamentally a cross compiler. It behaves more like GCC when built
as a cross compiler, and so it should just use multilib installs when
they are present on the system. However, there is a very specific
exemption for Exherbo, which I can't test on, so I'm leaving that in
place.

With this, check in a generic test tree for multilib on a 32-bit host.
This stubs out many directories that most distributions don't use but
that uptsream GCC supports. This is intended to be an agnostic test that
the driver behaves properly compared with the GCC driver it aims for
compatibility with.

Also, fix a bug in the driver that this testing exposed (see!) where it
was incorrectly testing the target architecture rather than the host
architecture.

If anyone is having trouble with the tree-structure stubs I'm creating
to test this, let me know and I can revisit the design. I chose this
over (for example) a tar-ball in order to make tests run faster at the
small, hopefully amortized VCS cost.

llvm-svn: 140999
2011-10-03 09:00:50 +00:00
Chandler Carruth 35cd702e73 Relax an assertion here a bit. This doesn't really matter, as we won't
include *any* path on crtbegin.o unless we actually find such a file via
one of the search paths. We still strictly check the search paths right
after this, so we'll catch any issues there.

The reason for this is that the driver does some normalization of the
path on the actual object file, and this changes the textual format of
the string on Windows. It no longer matches the textual format of the
sysroot flag.

llvm-svn: 140998
2011-10-03 08:16:09 +00:00
Chandler Carruth 2c5e91e2e5 Test that we include a GCC-triple-prefixed tree. While I don't know of
any distros that use this, building a multilib GCC from mainline will
install linker scripts here.

llvm-svn: 140996
2011-10-03 08:09:02 +00:00
Chandler Carruth 5fdc7cba2a Teach the logic for locating an installed GCC about the system root.
This requires fixing a latent bug -- if we used the default host triple
instead of an autodetected triple to locate GCC's installation, we
didn't go back and fix the GCC triple. Correct that with a pile of
hacks. This entire routine needs a major refactoring which I'm saving
for a subsequent commit. Essentially, the detection of the GCC triple
should be hoisted into the same routine as we locate the GCC
installation: the first is intrinsically tied to the latter. Then the
routine will just return the triple and base directory.

Also start to bring the rest of the library search path logic under
test, including locating crtbegin.o. Still need to test the multilib and
other behaviors, but there are also bugs in the way of that.

llvm-svn: 140995
2011-10-03 08:02:58 +00:00
Chandler Carruth 2a649c7a42 Add initial support for applying the sysroot to library search paths.
This is still very much a WIP, but sysroot was completely broken before
this so we are moving closer to correctness.

The crux of this is that 'ld' (on Linux, the only place I'm touching
here) doesn't apply the sysroot to any flags given to it. Instead, the
driver must translate all the paths it adds to the link step with the
system root. This is easily observed by building a GCC that supports
sysroot, and checking its driver output.

This patch just fixes the non-multilib library search paths. We should
also use this in many other places, but first things first.

This also allows us to make the Linux 'ld' test independent of the host
system. This in turn will allow me to check in test tree configurations
based on various different distro's configuration. Again, WIP.

llvm-svn: 140990
2011-10-03 06:41:08 +00:00
Chandler Carruth 413e5ac2a5 Rework the selection of builtin library search paths on Linux to
precisely match the pattern and logic used by the GCC driver on Linux as
of a recent SVN checkout.

This happens to follow a *much* more principled approach. There is
a strict hierarchy of paths examined, first with multilib-suffixing,
second without such suffixing. Any and all of these directories which
exist will be added to the library search path when using GCC.

There were many places where Clang followed different paths, omitted
critical entries, and worst of all (in terms of challenges to debugging)
got the entries in a subtly wrong order.

If this breaks Clang on a distro you use, please let me know, and I'll
work with you to figure out what is needed to work on that distro. I've
checked the behavior of the latest release of Ubuntu, OpenSUSE, Fedora,
and Gentoo. I'll be testing it on those as well as Debian stable and
unstable and ArchLinux. I may even dig out a Slackware install.

No real regression tests yet, those will follow once I add enough
support for sysroot to simulate various distro layouts in the testsuite.

llvm-svn: 140981
2011-10-03 05:28:29 +00:00
Peter Collingbourne 7277fe8aed CUDA: diagnose invalid calls across targets
llvm-svn: 140978
2011-10-02 23:49:40 +00:00
Peter Collingbourne 619a8c7df3 CUDA: add separate diagnostics for too few/many exec config args
llvm-svn: 140977
2011-10-02 23:49:29 +00:00
Peter Collingbourne 34a20b081e CUDA: diagnose unconfigured calls to global functions
llvm-svn: 140975
2011-10-02 23:49:15 +00:00
John McCall 7de05027a5 Sorry, I misunderstood the interaction here; the GNU runtime does
support both a fragile and non-fragile ABI, and it can be selected at
runtime.  That driver option also works on Darwin (although obviously
the code is not necessarily usable if the system runtime is fragile)
so just do that.

llvm-svn: 140973
2011-10-02 20:27:18 +00:00
John McCall e6a1d3c467 Use -fgnu-runtime to force the use of the non-fragile ABI;
otherwise these tests would fail on hosts that happen to default
to that, since that affects whether default synthesis can happen.

llvm-svn: 140970
2011-10-02 11:28:21 +00:00
Chandler Carruth 9b0f5688b9 Temporarily XFAIL this test until John or someone else who works on ObjC
can look at it.

llvm-svn: 140968
2011-10-02 09:52:36 +00:00
John McCall 9b0a7cea0f Make -fobjc-nonfragile-abi the -cc1 default, since it's the
increasingly prevailing case to the point that new features
like ARC don't even support the fragile ABI anymore.

This required a little bit of reshuffling with exceptions
because a check was assuming that ObjCNonFragileABI was
only being set in ObjC mode, and that's actually a bit
obnoxious to do.

Most, though, it involved a perl script to translate a ton
of test cases.

Mostly no functionality change for driver users, although
there are corner cases with disabling language-specific
exceptions that we should handle more correctly now.

llvm-svn: 140957
2011-10-02 01:16:38 +00:00
Ted Kremenek 2a14c695eb Fix LiveVariables analysis bug with MaterializeTemporaryExpr and fix handling in ExprEngine. Fixes <rdar://problem/10201666>.
llvm-svn: 140956
2011-10-02 00:54:48 +00:00
John McCall 248512a573 When performing an @throw in ARC, retain + autorelease
the pointer, being sure to do so before running cleanups
associated with that full-expression.  rdar://10042689

llvm-svn: 140945
2011-10-01 10:32:24 +00:00
John McCall a55902bf98 Parse attributes written in an ObjC method parameter type as
attributes on the parameter declaration.

llvm-svn: 140944
2011-10-01 09:56:14 +00:00
Anna Zaks 79ada929b7 Address PR10616. The crash has already been fixed by Ted in r140725, so just refactor to use existing API + test case.
llvm-svn: 140932
2011-10-01 06:35:19 +00:00
John McCall 42856de542 Hey, maybe we shouldn't silently ignore decl attributes
on declarators written as types.

llvm-svn: 140931
2011-10-01 05:17:03 +00:00
Chandler Carruth 59d9ebb103 As I suspected, completely non-multilib machines just get no suffix.
Make the suffixes optional everywhere, and just make sure they have the
right value. The suffixes aren't the interesting part of this test
anyways.

Sorry for the churn as I let the bots try out various patterns.

llvm-svn: 140927
2011-10-01 02:39:57 +00:00
Richard Smith eb3c10c248 constexpr: semantic checking for constexpr functions and constructors. Based in
part on patches by Peter Collingbourne.

We diverge from the C++11 standard in a few areas, mostly related to checking
constexpr function declarations, and not just definitions. See WG21 paper
N3308=11-0078 for details.

Function invocation substitution is not available in this patch; constexpr
functions cannot yet be used from within constant expressions.

llvm-svn: 140926
2011-10-01 02:31:28 +00:00
Chandler Carruth c5ab7efea3 Teach this test to cope with Windows suffixes so that msys builds can
run it.

llvm-svn: 140925
2011-10-01 02:08:56 +00:00
Chandler Carruth 97bb841545 Correct my failure at writing proper regex's for FileCheck. Thanks Nick.
llvm-svn: 140920
2011-10-01 01:46:47 +00:00
Chandler Carruth 91052b6851 Allow for both 'lib' and 'lib32', as both seem to be in evidence. I've
left a FIXME to go track down more distros and see if 'lib' is ever the
64-bit half.

This should hopefully appease the build bots.

llvm-svn: 140915
2011-10-01 01:26:40 +00:00
Chandler Carruth 6276a75731 There might be an 'ld' without any path prefix.
llvm-svn: 140913
2011-10-01 01:03:45 +00:00
John McCall e4fe245716 Allow the results of cf_returns_not_retained function
calls, or calls to audited functions without an explicit
return attribute, to be casted without a bridge cast.
Tie this mechanism in with the existing exceptions to
the cast restrictions.  State those restrictions more
correctly and generalize.

llvm-svn: 140912
2011-10-01 01:01:08 +00:00
John McCall 525f05597f Tweak the interface for analyzing the CF conventions for a name
to take a FunctionDecl* instead of an llvm::StringRef.  Eventually
we might push more logic in there, like using slightly different
conventions for C++ methods.

Also, fix a bug where 'copy' and 'create' were being caught in 
non-camel-cased strings.  We want copyFoo and CopyFoo and XCopy
but not Xcopy or xcopy.

llvm-svn: 140911
2011-10-01 00:48:56 +00:00
Chandler Carruth 94bcd38d10 Add a test that ensures we get the basic multilib '-L' flags to 'ld'
invocations on Linux.

llvm-svn: 140909
2011-10-01 00:37:39 +00:00
Daniel Dunbar 920844c36e Revert my --working-directory option, which wasn't well thought through.
llvm-svn: 140889
2011-09-30 21:33:09 +00:00
Fariborz Jahanian 044a5be6fb objc arc: allow objc_returns_inner_pointer on methods that return
a reference type, since inner reference is much like an inner pointer.
// rdar://10139365

llvm-svn: 140880
2011-09-30 20:50:23 +00:00
Eli Friedman 271002fc99 Support dllimport and dllexport on x86-64 Windows. PR10978. Patch by Ruben Van Boxem.
llvm-svn: 140871
2011-09-30 18:53:25 +00:00
Fariborz Jahanian 0c78427d50 objc gc: assigning to an objc object struct member through an ivar
pointer to this struct must go through the none ivar writer barrier.

llvm-svn: 140867
2011-09-30 18:23:36 +00:00
Argyrios Kyrtzidis 12afd70370 [libclang] Introduce CXCursor_CXXAccessSpecifier for C++'s public:/private:/protected: specifiers.
Patch by Paolo Capriotti!

llvm-svn: 140864
2011-09-30 17:58:23 +00:00
Sebastian Redl 0d16401228 Fix a bug in the token caching for inline constructors in C++11, and improve error recovery in both dialects. This should fix the GCC test suite failures as well.
llvm-svn: 140847
2011-09-30 08:32:17 +00:00
John McCall 32f5fe1467 Add explicit attributes to mark functions as having had their
CoreFoundation object-transfer properties audited, and add a #pragma
to cause them to be automatically applied to functions in a particular
span of code.  This has to be implemented largely in the preprocessor
because of the requirement that the region be entirely contained in
a single file;  that's hard to impose from the parser without registering
for a ton of callbacks.

llvm-svn: 140846
2011-09-30 05:12:12 +00:00
Ted Kremenek afedc07a9b Fix crash when analyzing C++ code involving constant enums and switch statements (<rdar://problem/10202899>).
llvm-svn: 140844
2011-09-30 03:51:54 +00:00
Anna Zaks 819b0d8619 [analyzer] Fix a bug in RetainReleaseChecker diagnostics. It gives more precise error message on the modified test case (and prevents duplicate diagnostics when we purge at block granularity).
llvm-svn: 140840
2011-09-30 02:19:19 +00:00
Anna Zaks 8d4c8e1498 [analyzer] Add -analyzer-purge option which can take on multiple values, remove -analyzer-purge=none. (Small refactor as well: move the work of constructing AnalysisManager from the callers to the class itself.)
llvm-svn: 140838
2011-09-30 02:03:00 +00:00
Eli Friedman a4b02c30de Some fixes for MS-style asm parsing: specifically, add some error checking, and handle asm comments using semicolons correctly. (The comments are actually surprisingly tricky.)
llvm-svn: 140837
2011-09-30 01:13:51 +00:00
Richard Smith 7cd25b2836 constexpr functions are implicitly const. More tests to follow.
llvm-svn: 140831
2011-09-30 00:45:47 +00:00
Richard Smith 7b729cdbff Suggest adding 'constexpr' if the GNU extension for in-class initializers for static const float members is used in C++11 mode.
llvm-svn: 140828
2011-09-30 00:33:19 +00:00
Richard Smith 256336d9ab Mark the ExtWarn for in-class initialization of static const float members as a GNU extension. Don't extend the scope of this extension to all literal types in C++0x mode.
llvm-svn: 140820
2011-09-29 23:18:34 +00:00
Eli Friedman 76d4e43063 PR11040: CheckICE should not allow an lvalue bitcast as part of an integer constant expression.
llvm-svn: 140812
2011-09-29 21:49:34 +00:00
Richard Smith ee6311df69 In C++0x, static const volatile data members cannot be initialized in-class.
llvm-svn: 140809
2011-09-29 21:28:14 +00:00
Richard Smith 1a526fd96c PR11000: Fix crash on invalid.
llvm-svn: 140802
2011-09-29 19:42:27 +00:00
Richard Smith 2316cd8b79 constexpr: semantic checking for constexpr variables.
We had an extension which allowed const static class members of floating-point type to have in-class initializers, 'as a C++0x extension'. However, C++0x does not allow this. The extension has been kept, and extended to all literal types in C++0x mode (with a fixit to add the 'constexpr' specifier).

llvm-svn: 140801
2011-09-29 19:11:37 +00:00
Fariborz Jahanian d71061298c c - Enumerators may inherit the deprecated/unavailable
attributes from the enumeration type.
// rdar://10201690

llvm-svn: 140800
2011-09-29 18:40:01 +00:00
Peter Collingbourne 2f3cf4b158 Add support for alignment-specifiers in C1X and C++11, remove
support for the C++0x draft [[align]] attribute and add the C1X
standard header file stdalign.h

llvm-svn: 140796
2011-09-29 18:04:28 +00:00
Peter Collingbourne 4ce4de8ead Add a warning group for warnings about using C1X features as extensions
llvm-svn: 140795
2011-09-29 18:04:12 +00:00
Peter Collingbourne 49eedecd70 Add support for parsing an attribute-specifier-seq containing multiple
attribute-specifiers

llvm-svn: 140794
2011-09-29 18:04:05 +00:00
Peter Collingbourne 70188b3fc2 Add support for parsing the optional attribute-specifier-seq at the
end of a decl-specifier-seq

llvm-svn: 140793
2011-09-29 18:03:57 +00:00