Richard Smith
f368fb40df
constexpr: Disable checking of constructor member initializer lists for
...
constexpr constructor templates. Such checking is optional, and currently hard
to get right since clang doesn't generate implicit member initializers until
instantiation (even for non-dependent members).
This is needed for clang to accept libstdc++ from g++4.6 in c++0x mode.
llvm-svn: 141547
2011-10-10 16:38:04 +00:00
Douglas Gregor
bcc9539323
Don't complain about qualified property or ivar access when the
...
qualifier itself is invalid. Crasher noticed by Fariborz.
llvm-svn: 141544
2011-10-10 16:09:49 +00:00
Douglas Gregor
b06fa540e8
When adding a direct initializer to a declaration, allow the
...
initializer to update the type of the declaration. For example, this
allows us to determine the size of an incomplete array from its
initializer. Fixes PR10288.
llvm-svn: 141543
2011-10-10 16:05:18 +00:00
Douglas Gregor
728d00b8e7
Parse the initializer for a class member after handling its
...
declarator, so that the declarator is in scope for the
initializer. Fixes PR9989.
llvm-svn: 141539
2011-10-10 14:49:18 +00:00
Douglas Gregor
877d4ebba4
Always add the built-in overload candidates for operators &&, ||, and
...
!. Fixes PR9865.
llvm-svn: 141537
2011-10-10 14:05:31 +00:00
Douglas Gregor
3053586149
Remove the TODO file; it's not interesting any more
...
llvm-svn: 141536
2011-10-10 13:43:20 +00:00
Benjamin Kramer
138ef9ca4a
Another case of HadMultipleCandidates being used uninitialized.
...
llvm-svn: 141532
2011-10-10 12:54:05 +00:00
Alexis Hunt
d6da876bac
Begin work consolidating ShouldDelete* functions.
...
Begin with just default constructors. One note is that as a side effect
of this, a conformance test was removed on the basis that this is almost
certainly a defect as with most of union initialization. As it is, clang
does not implement union initialization close to the standard as it's
quite broken as written. I hope to write a paper addressing the issues
eventually.
llvm-svn: 141528
2011-10-10 06:18:57 +00:00
Tobias Grosser
11ce922456
Parse LLVM command line arguments after plugins have been loaded
...
This fixes a crash due to command line options, that are not available
before the loading of plugins finished.
llvm-svn: 141525
2011-10-10 01:23:06 +00:00
Douglas Gregor
16e65616d6
Implement the restrictions in C++ [class.friend]p6, which disallow
...
defining a friend function with a qualified name or in a local
class. Fixes PR9853.
llvm-svn: 141524
2011-10-10 01:11:59 +00:00
Douglas Gregor
12340e5b18
Diagnose attempts to qualify the name of an instance variable or
...
property in an Objective-C++ member access expression. Fixes PR9759.
llvm-svn: 141522
2011-10-09 23:22:49 +00:00
Douglas Gregor
f7b98957ac
Push "out-of-line" declarations into scope when their lexical/semantic
...
redeclaration contexts are the same, as occurs within linkage
specifications. Fixes PR9162.
llvm-svn: 141521
2011-10-09 22:57:49 +00:00
Douglas Gregor
56636589ff
The effective context of a friend function is its lexical
...
context. Fixes PR9103.
llvm-svn: 141520
2011-10-09 22:38:36 +00:00
Douglas Gregor
f892c7fe60
For the various CF and NS attributes, don't complain if the parameter
...
or return types are dependent. Fixes PR9049.
llvm-svn: 141518
2011-10-09 22:26:49 +00:00
Douglas Gregor
0c83c8128b
Per the note in C++0x [temp.deduct.call]p4, don't attempt template
...
argument deduction against a function parameter that has no deducible
template parameters in it. Fixes PR8598.
llvm-svn: 141517
2011-10-09 22:06:46 +00:00
Peter Collingbourne
1deb5b61f4
OpenCL: add driver/frontend support for precompiled headers
...
llvm-svn: 141516
2011-10-09 22:03:19 +00:00
Douglas Gregor
e9d075e434
A friend template specialization is also dependent if any of its
...
template arguments are dependent. Fixes PR10913.
llvm-svn: 141515
2011-10-09 20:59:17 +00:00
Douglas Gregor
668d362503
Only allow taking the address of an expression of type 'overloaded
...
function type' when that expression is actually an overloaded function
reference (and not the address of an overloaded function
reference). Fixes PR11066.
llvm-svn: 141514
2011-10-09 19:10:41 +00:00
Douglas Gregor
bb64afcc39
Diagnose attempts to declare a non-static data member with a
...
non-identifier name. Fixes PR10839.
llvm-svn: 141513
2011-10-09 18:55:59 +00:00
Douglas Gregor
c4475e8cd6
When building source location information for an _Atomic type, be sure
...
to fill in the source locations for the underlying value type. Fixes
an intermittent crasher (due to uninitialized data) in the PCH test
for _Atomic types.
llvm-svn: 141512
2011-10-09 18:45:17 +00:00
Douglas Gregor
4d328b6e16
After instantiating a 'noexcept' expression, be sure to convert it to
...
a boolean value and check that it is a constant expression. Fixes
PR11084.
llvm-svn: 141511
2011-10-09 18:31:23 +00:00
Benjamin Kramer
ec44099cf8
Initialize the HadMultipleCandidates flag.
...
Found by valgrind.
llvm-svn: 141510
2011-10-09 17:58:25 +00:00
Fariborz Jahanian
9059124b41
objc: Do not warn about mismatch on Super's readonly property attribute,
...
related to a readwrite property, and
Sub's readwrite property. // rdar://9396329
llvm-svn: 141497
2011-10-08 17:45:33 +00:00
Benjamin Kramer
ec173a5c92
Silence a warning about casting away constness.
...
llvm-svn: 141496
2011-10-08 16:15:07 +00:00
NAKAMURA Takumi
0010bd96c9
lib/Frontend/CompilerInstance.cpp: Suppress a "Comparision of unsigned and signed" warning on Cygwin gcc-4.3.4.
...
llvm-svn: 141488
2011-10-08 11:31:58 +00:00
NAKAMURA Takumi
93eafc6ce1
Fix "Uninitialized" warnings.
...
llvm-svn: 141487
2011-10-08 11:31:53 +00:00
NAKAMURA Takumi
82a351197f
Whitespace
...
llvm-svn: 141486
2011-10-08 11:31:46 +00:00
David Chisnall
e0dc7cb2e2
Apparently getPtrToInt() takes an explicit type parameter to allow you to generate invalid bitcode, not so that it can actually produce a value of this type. This should fix PR11085.
...
llvm-svn: 141482
2011-10-08 08:54:36 +00:00
Ted Kremenek
c168e50722
Free 'TheTargetCodeGenInfo' in the class CodeGenModule. This looks like an obvious memory leak that was reported from LLDB devs. The comment indicates the leak is deliberate, but I have no idea why this needs to be so. Please comment/revert if you know otherwise.
...
llvm-svn: 141479
2011-10-08 05:28:26 +00:00
Eli Friedman
235266700a
Fix warning on MSVC. Patch by Aaron Ballman.
...
llvm-svn: 141467
2011-10-08 01:03:47 +00:00
Argyrios Kyrtzidis
f8585fbe57
Try fixing windows bots.
...
llvm-svn: 141462
2011-10-08 00:54:49 +00:00
Peter Collingbourne
bf8989fd19
Make clang-tblgen's Makefile independent of Clang's top-level Makefile,
...
to avoid having to make it available for the cross build when it
builds only clang-tblgen.
llvm-svn: 141453
2011-10-08 00:26:35 +00:00
Argyrios Kyrtzidis
741fab1358
[arcmt] Ignore linking errors when doing ARC migration, rdar://10247606
...
llvm-svn: 141434
2011-10-07 22:58:08 +00:00
Ted Kremenek
d79719b144
Provide basic static analyzer support for CXXTemporaryObjectExpr. Patch by Jim Goodnow II.
...
llvm-svn: 141433
2011-10-07 22:48:13 +00:00
Anna Zaks
34e8b0f560
[analyzer] Remove dead code.
...
llvm-svn: 141432
2011-10-07 22:35:23 +00:00
Ted Kremenek
dccc2b2277
Remove AnalysisContext::getLiveVariables(), and introduce a templatized mechanism to lazily create analyses that are attached to AnalysisContext objects.
...
llvm-svn: 141425
2011-10-07 22:21:02 +00:00
Argyrios Kyrtzidis
094da739e0
In DeclContext::LoadLexicalDeclsFromExternalStorage don't clear out
...
the fields if they are already loaded, just ignore them when we are building
the chain in BuildDeclChain.
This fixes an lldb issue where fields were removed and not getting re-added
because lldb is based on ASTImporter adding decls to DeclContext and fields
were already added before by the ASTImporter.
We should really simplify the interaction between DeclContext <-> lldb
going forward..
rdar://10246067
llvm-svn: 141418
2011-10-07 21:55:43 +00:00
Anna Zaks
754eafb765
[analyzer] Previously, we were passing to CheckerContext enough info to construct ProgramPoint and it would pass it to NodeBuilder, which in turn would construct the ProgramPoint. Simplify it by just passing the ProgramPoint to CheckerContext. The ProgramPoint can only change if a checker tags it, in which case, we create a copy with the given tag.
...
(A step closer to making CheckerContext work with all node builders, not only StmtNodeBuilder.)
llvm-svn: 141417
2011-10-07 21:52:33 +00:00
Fariborz Jahanian
13d3f86577
objc++: some minor cleanup and a test case
...
for atomic setters which requires assignment operator.
llvm-svn: 141415
2011-10-07 21:08:14 +00:00
Anna Zaks
8de8cfdd21
ProgramPoint cleanup after the previous commit r141408 (remove the copy constructor, mark withTag const).
...
Move getProgramPoint() utility from CoreEngine.cpp into ProgramPoint.
llvm-svn: 141414
2011-10-07 21:01:38 +00:00
Douglas Gregor
6f981006f6
Add braces around do-while body. The lack of them gives me the chills
...
llvm-svn: 141411
2011-10-07 20:35:25 +00:00
Eli Friedman
73ddccf7d7
Add a simple PCH test for _Atomic.
...
llvm-svn: 141409
2011-10-07 20:08:35 +00:00
Anna Zaks
eab4bf8fe9
Add a copy constructor to ProgramPoint and pull withTag() method from a child. (withTag essentialy creates a copy with a given tag.)
...
llvm-svn: 141408
2011-10-07 20:08:27 +00:00
Eli Friedman
1f19100451
Add address spaces for TCE target. Patch by Pekka Jääskeläinen.
...
llvm-svn: 141390
2011-10-07 19:51:42 +00:00
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
Bob Wilson
102be44843
Clang driver changes for iOS 5.0 and OS X Lion support.
...
Check whether the libc++ library is available when using -stdlib=libc++,
and also adjust the check for whether to link with -lgcc_s.1.
Patch by Ted Kremenek and Daniel Dunbar.
llvm-svn: 141374
2011-10-07 17:54:41 +00:00
Chad Rosier
9ac845149b
More cleanup using StringSwitch.
...
llvm-svn: 141373
2011-10-07 17:48:56 +00:00
Fariborz Jahanian
942bbcea25
objc rewriter. Fix declaration of objc_msgSend_stret/objc_msgSendSuper_stret.
...
Fix an assert crash when casting a CF type to 'id'.
// rdar://10250911
llvm-svn: 141369
2011-10-07 17:17:45 +00:00
John McCall
f937c023bf
Rename TagDecl::isDefinition -> isCompleteDefinition
...
for better self-documenting code, since the semantics
are subtly different from getDefinition().
llvm-svn: 141355
2011-10-07 06:10:15 +00:00
Richard Smith
779b8b0f33
Remove FIXME obsoleted by change r141279 for PR11067.
...
llvm-svn: 141351
2011-10-07 03:16:33 +00:00