]> granicus.if.org Git - clang/log
clang
12 years agoAdd typo correction for type names.
Kaelyn Uhrain [Tue, 11 Oct 2011 01:02:41 +0000 (01:02 +0000)]
Add typo correction for type names.

The main motivation was to do typo correction in C++ "new" statements,
though picking it up in other places where type names are expected was
pretty much a freebie.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141621 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPlace diagnostic group ext_typecheck_decl_incomplete_type under a -W flag.
Ted Kremenek [Tue, 11 Oct 2011 01:02:24 +0000 (01:02 +0000)]
Place diagnostic group ext_typecheck_decl_incomplete_type under a -W flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141620 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFixed natural stack alignment for Linux x86-32. Thanks Eli.
Lang Hames [Tue, 11 Oct 2011 00:52:51 +0000 (00:52 +0000)]
Fixed natural stack alignment for Linux x86-32. Thanks Eli.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141617 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoClean up DiagnoseInvalidRedeclaration a bit
Kaelyn Uhrain [Tue, 11 Oct 2011 00:28:52 +0000 (00:28 +0000)]
Clean up DiagnoseInvalidRedeclaration a bit

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141612 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMove a couple chunks of ActOnFunctionDeclarator to separate functions
Kaelyn Uhrain [Tue, 11 Oct 2011 00:28:49 +0000 (00:28 +0000)]
Move a couple chunks of ActOnFunctionDeclarator to separate functions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141611 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMove some bool flags out of function parameter lists.
Kaelyn Uhrain [Tue, 11 Oct 2011 00:28:45 +0000 (00:28 +0000)]
Move some bool flags out of function parameter lists.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141610 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoOnly accept a typo correction if it doesn't trigger additional errors
Kaelyn Uhrain [Tue, 11 Oct 2011 00:28:39 +0000 (00:28 +0000)]
Only accept a typo correction if it doesn't trigger additional errors

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141609 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoExtend lvalue evaluation in ExprConstant.cpp to handle CK_LValueBitCast (which is...
Eli Friedman [Tue, 11 Oct 2011 00:13:24 +0000 (00:13 +0000)]
Extend lvalue evaluation in ExprConstant.cpp to handle CK_LValueBitCast (which is completely trivial).  PR8836.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141604 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUpdate target data strings for ARM and X86 to include the natural stack
Lang Hames [Mon, 10 Oct 2011 23:44:43 +0000 (23:44 +0000)]
Update target data strings for ARM and X86 to include the natural stack
alignment parameter "S<size>" that was introduced in r141599.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141601 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDon't crash in Sema::IsSimplyAccessible if the declaration is not a C++ class member...
Douglas Gregor [Mon, 10 Oct 2011 23:44:35 +0000 (23:44 +0000)]
Don't crash in Sema::IsSimplyAccessible if the declaration is not a C++ class member. Fixes PR11108.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141600 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake sure we initialize the "extra" data within the libclang code
Douglas Gregor [Mon, 10 Oct 2011 23:37:54 +0000 (23:37 +0000)]
Make sure we initialize the "extra" data within the libclang code
completion context, in case we end up having no code-completion
callback. Individual instances of this problem are always bugs that
need to be fixed, but it's better to make sure we have initialized
data here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141598 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoA couple random preprocessor changes that got ported from C99 to C++11.
Eli Friedman [Mon, 10 Oct 2011 23:35:28 +0000 (23:35 +0000)]
A couple random preprocessor changes that got ported from C99 to C++11.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141596 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhen performing a user-defined conversion via a constructor, be sure
Douglas Gregor [Mon, 10 Oct 2011 22:41:00 +0000 (22:41 +0000)]
When performing a user-defined conversion via a constructor, be sure
to check whether the constructor is accessible. Fixes
<rdar://problem/10202900>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141588 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Teach the static analyzer about CXXForRangeStmt. Patch by Jim Goodnow II!
Ted Kremenek [Mon, 10 Oct 2011 22:36:31 +0000 (22:36 +0000)]
[analyzer] Teach the static analyzer about CXXForRangeStmt.  Patch by Jim Goodnow II!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141587 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRework construction of CXXForRangeStmt not to recycle the same DeclRefExpr in multipl...
Ted Kremenek [Mon, 10 Oct 2011 22:36:28 +0000 (22:36 +0000)]
Rework construction of CXXForRangeStmt not to recycle the same DeclRefExpr in multiple subexpressions.  This breaks the tree structure
of the AST and completely breaks the CFG invariants.

Patch by Jim Goodnow II and reviewed by Richard Smith!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141586 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[libclang] Do ConcurrencyCheck for clang_getLocation as well.
Argyrios Kyrtzidis [Mon, 10 Oct 2011 21:57:15 +0000 (21:57 +0000)]
[libclang] Do ConcurrencyCheck for clang_getLocation as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141583 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[libclang] Implement ConcurrencyCheck using a recursive mutex to allow re-entrancy...
Argyrios Kyrtzidis [Mon, 10 Oct 2011 21:57:12 +0000 (21:57 +0000)]
[libclang] Implement ConcurrencyCheck using a recursive mutex to allow re-entrancy in the same thread.
The checks are performed only in DEBUG, it becomes no-op in release mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141582 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoobjc: err on a property designated both atomic and
Fariborz Jahanian [Mon, 10 Oct 2011 21:53:24 +0000 (21:53 +0000)]
objc: err on a property designated both atomic and
nonatomic. // rdar://10260017

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141580 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRevert r140009, about disabling clang's builtin in -fms-compatibility mode.
Francois Pichet [Mon, 10 Oct 2011 20:34:10 +0000 (20:34 +0000)]
Revert r140009, about disabling clang's builtin in -fms-compatibility mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141577 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoLink in Scrt1.o instead of crt1.o when -pie is specified.
Roman Divacky [Mon, 10 Oct 2011 19:47:45 +0000 (19:47 +0000)]
Link in Scrt1.o instead of crt1.o when -pie is specified.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141573 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhen substituting into a sizeof parameter pack expression in a context
Douglas Gregor [Mon, 10 Oct 2011 18:59:29 +0000 (18:59 +0000)]
When substituting into a sizeof parameter pack expression in a context
where we can't expand (i.e., multi-level substitution), be sure to
substitute the pack with its level-reduced pack. Fixes PR10230.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141568 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPartially revert r141374: allow use of libc++ prior to Mac OS X 10.7.
Bob Wilson [Mon, 10 Oct 2011 18:46:10 +0000 (18:46 +0000)]
Partially revert r141374: allow use of libc++ prior to Mac OS X 10.7.

Apple only supports libc++ on OS X 10.7 and later but for the open-source
compiler that restriction doesn't make sense.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141566 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhen an included non-system directory duplicates a system directory the clang
Chad Rosier [Mon, 10 Oct 2011 18:44:24 +0000 (18:44 +0000)]
When an included non-system directory duplicates a system directory the clang
frontend removes the non-system directory to maintain gcc compatibility.  When
this happens NumAngled needs to be updated.
PR11097

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141565 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoConstant expression evaluation refactoring:
Richard Smith [Mon, 10 Oct 2011 18:28:20 +0000 (18:28 +0000)]
Constant expression evaluation refactoring:
 - Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions,
   and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert
   behaviour.
 - Factor out evaluation of bitfield bit widths.
 - Fix a few places which would evaluate an expression twice: once to determine
   whether it is a constant expression, then again to get the value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141561 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDon't suggest 'noreturn' for function template instantiations, because
Douglas Gregor [Mon, 10 Oct 2011 18:15:57 +0000 (18:15 +0000)]
Don't suggest 'noreturn' for function template instantiations, because
it might be wrong for other instantiations of the same function
template. Fixes PR10801.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141559 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoNow that we support move generation, mention this in the language extension and C...
Sebastian Redl [Mon, 10 Oct 2011 18:10:00 +0000 (18:10 +0000)]
Now that we support move generation, mention this in the language extension and C++ status pages. Also update the C++ status for default functions, which are complete now that we can generate move functions, and destructor exception specifications, which I did a while ago.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141558 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoGive nicer note when a member redeclaration has or lacks 'const'
Kaelyn Uhrain [Mon, 10 Oct 2011 18:01:37 +0000 (18:01 +0000)]
Give nicer note when a member redeclaration has or lacks 'const'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141555 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoobjc: Some refactoring of overriding method decl. code
Fariborz Jahanian [Mon, 10 Oct 2011 17:53:29 +0000 (17:53 +0000)]
objc: Some refactoring of overriding method decl. code
for future work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141553 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDon't analyze comparisons in type- or value-dependent
Douglas Gregor [Mon, 10 Oct 2011 17:38:18 +0000 (17:38 +0000)]
Don't analyze comparisons in type- or value-dependent
subexpressions. Fixes PR10291.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141552 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPer C++ [class.bit]p2, unnamed bit-fields are not members. Fixes PR10289.
Douglas Gregor [Mon, 10 Oct 2011 17:22:13 +0000 (17:22 +0000)]
Per C++ [class.bit]p2, unnamed bit-fields are not members. Fixes PR10289.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141549 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoconstexpr: Disable checking of constructor member initializer lists for
Richard Smith [Mon, 10 Oct 2011 16:38:04 +0000 (16:38 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141547 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDon't complain about qualified property or ivar access when the
Douglas Gregor [Mon, 10 Oct 2011 16:09:49 +0000 (16:09 +0000)]
Don't complain about qualified property or ivar access when the
qualifier itself is invalid. Crasher noticed by Fariborz.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141544 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhen adding a direct initializer to a declaration, allow the
Douglas Gregor [Mon, 10 Oct 2011 16:05:18 +0000 (16:05 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141543 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoParse the initializer for a class member after handling its
Douglas Gregor [Mon, 10 Oct 2011 14:49:18 +0000 (14:49 +0000)]
Parse the initializer for a class member after handling its
declarator, so that the declarator is in scope for the
initializer. Fixes PR9989.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141539 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAlways add the built-in overload candidates for operators &&, ||, and
Douglas Gregor [Mon, 10 Oct 2011 14:05:31 +0000 (14:05 +0000)]
Always add the built-in overload candidates for operators &&, ||, and
!. Fixes PR9865.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141537 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove the TODO file; it's not interesting any more
Douglas Gregor [Mon, 10 Oct 2011 13:43:20 +0000 (13:43 +0000)]
Remove the TODO file; it's not interesting any more

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141536 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAnother case of HadMultipleCandidates being used uninitialized.
Benjamin Kramer [Mon, 10 Oct 2011 12:54:05 +0000 (12:54 +0000)]
Another case of HadMultipleCandidates being used uninitialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141532 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoBegin work consolidating ShouldDelete* functions.
Sean Hunt [Mon, 10 Oct 2011 06:18:57 +0000 (06:18 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141528 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoParse LLVM command line arguments after plugins have been loaded
Tobias Grosser [Mon, 10 Oct 2011 01:23:06 +0000 (01:23 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141525 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoImplement the restrictions in C++ [class.friend]p6, which disallow
Douglas Gregor [Mon, 10 Oct 2011 01:11:59 +0000 (01:11 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141524 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDiagnose attempts to qualify the name of an instance variable or
Douglas Gregor [Sun, 9 Oct 2011 23:22:49 +0000 (23:22 +0000)]
Diagnose attempts to qualify the name of an instance variable or
property in an Objective-C++ member access expression. Fixes PR9759.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141522 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPush "out-of-line" declarations into scope when their lexical/semantic
Douglas Gregor [Sun, 9 Oct 2011 22:57:49 +0000 (22:57 +0000)]
Push "out-of-line" declarations into scope when their lexical/semantic
redeclaration contexts are the same, as occurs within linkage
specifications. Fixes PR9162.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141521 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThe effective context of a friend function is its lexical
Douglas Gregor [Sun, 9 Oct 2011 22:38:36 +0000 (22:38 +0000)]
The effective context of a friend function is its lexical
context. Fixes PR9103.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141520 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFor the various CF and NS attributes, don't complain if the parameter
Douglas Gregor [Sun, 9 Oct 2011 22:26:49 +0000 (22:26 +0000)]
For the various CF and NS attributes, don't complain if the parameter
or return types are dependent. Fixes PR9049.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141518 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPer the note in C++0x [temp.deduct.call]p4, don't attempt template
Douglas Gregor [Sun, 9 Oct 2011 22:06:46 +0000 (22:06 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141517 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoOpenCL: add driver/frontend support for precompiled headers
Peter Collingbourne [Sun, 9 Oct 2011 22:03:19 +0000 (22:03 +0000)]
OpenCL: add driver/frontend support for precompiled headers

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141516 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoA friend template specialization is also dependent if any of its
Douglas Gregor [Sun, 9 Oct 2011 20:59:17 +0000 (20:59 +0000)]
A friend template specialization is also dependent if any of its
template arguments are dependent. Fixes PR10913.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141515 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoOnly allow taking the address of an expression of type 'overloaded
Douglas Gregor [Sun, 9 Oct 2011 19:10:41 +0000 (19:10 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141514 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDiagnose attempts to declare a non-static data member with a
Douglas Gregor [Sun, 9 Oct 2011 18:55:59 +0000 (18:55 +0000)]
Diagnose attempts to declare a non-static data member with a
non-identifier name. Fixes PR10839.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141513 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhen building source location information for an _Atomic type, be sure
Douglas Gregor [Sun, 9 Oct 2011 18:45:17 +0000 (18:45 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141512 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAfter instantiating a 'noexcept' expression, be sure to convert it to
Douglas Gregor [Sun, 9 Oct 2011 18:31:23 +0000 (18:31 +0000)]
After instantiating a 'noexcept' expression, be sure to convert it to
a boolean value and check that it is a constant expression. Fixes
PR11084.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141511 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoInitialize the HadMultipleCandidates flag.
Benjamin Kramer [Sun, 9 Oct 2011 17:58:25 +0000 (17:58 +0000)]
Initialize the HadMultipleCandidates flag.

Found by valgrind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141510 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoobjc: Do not warn about mismatch on Super's readonly property attribute,
Fariborz Jahanian [Sat, 8 Oct 2011 17:45:33 +0000 (17:45 +0000)]
objc: Do not warn about mismatch on Super's readonly property attribute,
related to a readwrite property, and
Sub's readwrite property. // rdar://9396329

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141497 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSilence a warning about casting away constness.
Benjamin Kramer [Sat, 8 Oct 2011 16:15:07 +0000 (16:15 +0000)]
Silence a warning about casting away constness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141496 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agolib/Frontend/CompilerInstance.cpp: Suppress a "Comparision of unsigned and signed...
NAKAMURA Takumi [Sat, 8 Oct 2011 11:31:58 +0000 (11:31 +0000)]
lib/Frontend/CompilerInstance.cpp: Suppress a "Comparision of unsigned and signed" warning on Cygwin gcc-4.3.4.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141488 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix "Uninitialized" warnings.
NAKAMURA Takumi [Sat, 8 Oct 2011 11:31:53 +0000 (11:31 +0000)]
Fix "Uninitialized" warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141487 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhitespace
NAKAMURA Takumi [Sat, 8 Oct 2011 11:31:46 +0000 (11:31 +0000)]
Whitespace

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141486 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoApparently getPtrToInt() takes an explicit type parameter to allow you to generate...
David Chisnall [Sat, 8 Oct 2011 08:54:36 +0000 (08:54 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141482 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFree 'TheTargetCodeGenInfo' in the class CodeGenModule. This looks like an obvious...
Ted Kremenek [Sat, 8 Oct 2011 05:28:26 +0000 (05:28 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141479 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix warning on MSVC. Patch by Aaron Ballman.
Eli Friedman [Sat, 8 Oct 2011 01:03:47 +0000 (01:03 +0000)]
Fix warning on MSVC.  Patch by Aaron Ballman.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141467 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTry fixing windows bots.
Argyrios Kyrtzidis [Sat, 8 Oct 2011 00:54:49 +0000 (00:54 +0000)]
Try fixing windows bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141462 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake clang-tblgen's Makefile independent of Clang's top-level Makefile,
Peter Collingbourne [Sat, 8 Oct 2011 00:26:35 +0000 (00:26 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141453 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[arcmt] Ignore linking errors when doing ARC migration, rdar://10247606
Argyrios Kyrtzidis [Fri, 7 Oct 2011 22:58:08 +0000 (22:58 +0000)]
[arcmt] Ignore linking errors when doing ARC migration, rdar://10247606

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141434 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoProvide basic static analyzer support for CXXTemporaryObjectExpr. Patch by Jim Goodn...
Ted Kremenek [Fri, 7 Oct 2011 22:48:13 +0000 (22:48 +0000)]
Provide basic static analyzer support for CXXTemporaryObjectExpr.  Patch by Jim Goodnow II.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141433 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Remove dead code.
Anna Zaks [Fri, 7 Oct 2011 22:35:23 +0000 (22:35 +0000)]
[analyzer] Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141432 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove AnalysisContext::getLiveVariables(), and introduce a templatized mechanism...
Ted Kremenek [Fri, 7 Oct 2011 22:21:02 +0000 (22:21 +0000)]
Remove AnalysisContext::getLiveVariables(), and introduce a templatized mechanism to lazily create analyses that are attached to AnalysisContext objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141425 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoIn DeclContext::LoadLexicalDeclsFromExternalStorage don't clear out
Argyrios Kyrtzidis [Fri, 7 Oct 2011 21:55:43 +0000 (21:55 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141418 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Previously, we were passing to CheckerContext enough info to construct...
Anna Zaks [Fri, 7 Oct 2011 21:52:33 +0000 (21:52 +0000)]
[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.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141417 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoobjc++: some minor cleanup and a test case
Fariborz Jahanian [Fri, 7 Oct 2011 21:08:14 +0000 (21:08 +0000)]
objc++: some minor cleanup and a test case
for atomic setters which requires assignment operator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141415 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoProgramPoint cleanup after the previous commit r141408 (remove the copy constructor...
Anna Zaks [Fri, 7 Oct 2011 21:01:38 +0000 (21:01 +0000)]
ProgramPoint cleanup after the previous commit r141408 (remove the copy constructor, mark withTag const).

Move getProgramPoint() utility from CoreEngine.cpp into ProgramPoint.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141414 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd braces around do-while body. The lack of them gives me the chills
Douglas Gregor [Fri, 7 Oct 2011 20:35:25 +0000 (20:35 +0000)]
Add braces around do-while body. The lack of them gives me the chills

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141411 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd a simple PCH test for _Atomic.
Eli Friedman [Fri, 7 Oct 2011 20:08:35 +0000 (20:08 +0000)]
Add a simple PCH test for _Atomic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141409 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd a copy constructor to ProgramPoint and pull withTag() method from a child. (withT...
Anna Zaks [Fri, 7 Oct 2011 20:08:27 +0000 (20:08 +0000)]
Add a copy constructor to ProgramPoint and pull withTag() method from a child. (withTag essentialy creates a copy with a given tag.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141408 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd address spaces for TCE target. Patch by Pekka Jääskeläinen.
Eli Friedman [Fri, 7 Oct 2011 19:51:42 +0000 (19:51 +0000)]
Add address spaces for TCE target.  Patch by Pekka Jääskeläinen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141390 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoHack in a workaround for PR11082 until we have a proper fix. This
Chandler Carruth [Fri, 7 Oct 2011 18:40:27 +0000 (18:40 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141381 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoClang driver changes for iOS 5.0 and OS X Lion support.
Bob Wilson [Fri, 7 Oct 2011 17:54:41 +0000 (17:54 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141374 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMore cleanup using StringSwitch.
Chad Rosier [Fri, 7 Oct 2011 17:48:56 +0000 (17:48 +0000)]
More cleanup using StringSwitch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141373 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoobjc rewriter. Fix declaration of objc_msgSend_stret/objc_msgSendSuper_stret.
Fariborz Jahanian [Fri, 7 Oct 2011 17:17:45 +0000 (17:17 +0000)]
objc rewriter. Fix declaration of objc_msgSend_stret/objc_msgSendSuper_stret.
Fix an assert crash when casting a CF type to 'id'.
// rdar://10250911

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141369 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRename TagDecl::isDefinition -> isCompleteDefinition
John McCall [Fri, 7 Oct 2011 06:10:15 +0000 (06:10 +0000)]
Rename TagDecl::isDefinition -> isCompleteDefinition
for better self-documenting code, since the semantics
are subtly different from getDefinition().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141355 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove FIXME obsoleted by change r141279 for PR11067.
Richard Smith [Fri, 7 Oct 2011 03:16:33 +0000 (03:16 +0000)]
Remove FIXME obsoleted by change r141279 for PR11067.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141351 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRecord layout requires not just a definition, but a complete
John McCall [Fri, 7 Oct 2011 02:39:22 +0000 (02:39 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141350 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agor141345 also fixed a -Wuninitialized bug where loop conditions were not always flagge...
Ted Kremenek [Fri, 7 Oct 2011 00:52:56 +0000 (00:52 +0000)]
r141345 also fixed a -Wuninitialized bug where loop conditions were not always flagged as being uninitialized.  Addresses <rdar://problem/9432305>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141346 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix infinite loop in -Wuninitialized reported in PR 11069.
Ted Kremenek [Fri, 7 Oct 2011 00:42:48 +0000 (00:42 +0000)]
Fix infinite loop in -Wuninitialized reported in PR 11069.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141345 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUse StringSwitch. Thanks for Chandler for the suggestion.
Bob Wilson [Fri, 7 Oct 2011 00:37:57 +0000 (00:37 +0000)]
Use StringSwitch.  Thanks for Chandler for the suggestion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141344 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoobjc: Improve on diagnostic when atomic proeprty is synthesized
Fariborz Jahanian [Thu, 6 Oct 2011 23:47:58 +0000 (23:47 +0000)]
objc: Improve on diagnostic when atomic proeprty is synthesized
on one accessor and user-provide with another.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141343 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Static Analyzer Qualification Infrastructure: Scripts to support basic...
Anna Zaks [Thu, 6 Oct 2011 23:26:27 +0000 (23:26 +0000)]
[analyzer] Static Analyzer Qualification Infrastructure: Scripts to support basic testing of the analyzer on external projects. This can be used as a basis for setting up a buildbot.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141337 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMove type-checking for C-style casts in C into the now-misnamed
John McCall [Thu, 6 Oct 2011 23:25:11 +0000 (23:25 +0000)]
Move type-checking for C-style casts in C into the now-misnamed
SemaCXXCast.cpp.  Should have no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141336 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoImplicitly assume that a ObjC category to an unavailable interface is also unavailable;
Argyrios Kyrtzidis [Thu, 6 Oct 2011 23:23:27 +0000 (23:23 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141335 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhen using an unavailable/deprecated interface Foo inside Foo's interface/implementation
Argyrios Kyrtzidis [Thu, 6 Oct 2011 23:23:20 +0000 (23:23 +0000)]
When using an unavailable/deprecated interface Foo inside Foo's interface/implementation
don't emit unavailable errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141334 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agollvm.memory.barrier is going away; remove the wrapper intrinsic __builtin_llvm_memory...
Eli Friedman [Thu, 6 Oct 2011 23:12:03 +0000 (23:12 +0000)]
llvm.memory.barrier is going away; remove the wrapper intrinsic __builtin_llvm_memory_barrier.

__atomic_thread_fence will be landing soon as a replacement, wrapping around the new fence instruction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141332 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSupport for C1x _Atomic specifier (see testcase). This is primarily being committed...
Eli Friedman [Thu, 6 Oct 2011 23:00:33 +0000 (23:00 +0000)]
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!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141330 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUse strpbrk(3) instead of open coding it.
Benjamin Kramer [Thu, 6 Oct 2011 22:53:35 +0000 (22:53 +0000)]
Use strpbrk(3) instead of open coding it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141328 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd missing include to clang-interpreter example, to make it work on Windows. Patch...
Eli Friedman [Thu, 6 Oct 2011 22:24:13 +0000 (22:24 +0000)]
Add missing include to clang-interpreter example, to make it work on Windows.  Patch by Dean Pavlekovic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141324 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[driver] Fix test case for Windows due to fallout from r141202+r141205.
Chad Rosier [Thu, 6 Oct 2011 22:05:26 +0000 (22:05 +0000)]
[driver] Fix test case for Windows due to fallout from r141202+r141205.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141322 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove DISABLE_ARM_DARWIN_USE_MOVT ifdefs. Radar 9456730.
Bob Wilson [Thu, 6 Oct 2011 21:52:27 +0000 (21:52 +0000)]
Remove DISABLE_ARM_DARWIN_USE_MOVT ifdefs.  Radar 9456730.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141320 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[static analyzer] Fix crash in LiveVariables and Environment::getSVal() when analyzin...
Ted Kremenek [Thu, 6 Oct 2011 20:53:28 +0000 (20:53 +0000)]
[static analyzer] Fix crash in LiveVariables and Environment::getSVal() when analyzing C++ pointer-to-member calls.  Fixes <rdar://problem/10243398>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141312 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd _mm_comige_sd to emmintrin.h, since I apparently forgot to do this in r138769.
Eli Friedman [Thu, 6 Oct 2011 20:31:50 +0000 (20:31 +0000)]
Add _mm_comige_sd to emmintrin.h, since I apparently forgot to do this in r138769.

<rdar://problem/10230751>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141310 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRearrange for readability. No functional change.
Bob Wilson [Thu, 6 Oct 2011 20:27:40 +0000 (20:27 +0000)]
Rearrange for readability.  No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141309 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd a missing check for cortex-a9.
Bob Wilson [Thu, 6 Oct 2011 20:27:38 +0000 (20:27 +0000)]
Add a missing check for cortex-a9.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141308 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCUDA: IR generation support for device stubs
Peter Collingbourne [Thu, 6 Oct 2011 18:51:56 +0000 (18:51 +0000)]
CUDA: IR generation support for device stubs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141304 91177308-0d34-0410-b5e6-96231b3b80d8