]> granicus.if.org Git - clang/log
clang
12 years agoTeach CXXRecordDecl::hasIrrelevantDestructor to check the base classes and
Richard Smith [Sat, 25 Feb 2012 07:33:38 +0000 (07:33 +0000)]
Teach CXXRecordDecl::hasIrrelevantDestructor to check the base classes and
data members for deleted or user-provided destructors.

Now it's computed in advance, serialize it, and in passing fix all the other
record DefinitionData flags whose serialization was missing.

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

12 years agoFix a regression from r151117: ADL requires that we attempt to complete any
Richard Smith [Sat, 25 Feb 2012 06:24:24 +0000 (06:24 +0000)]
Fix a regression from r151117: ADL requires that we attempt to complete any
associated classes, since it can find friend functions declared within them,
but overload resolution does not otherwise require argument types to be
complete.

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

12 years agoPrevent llvm.lifetime intrinsics from being emitted at -O0.
Chad Rosier [Sat, 25 Feb 2012 02:56:13 +0000 (02:56 +0000)]
Prevent llvm.lifetime intrinsics from being emitted at -O0.
rdar://10921594

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

12 years agoWork-in-progress for lambda conversion-to-block operator. Still need to implement...
Eli Friedman [Sat, 25 Feb 2012 02:48:22 +0000 (02:48 +0000)]
Work-in-progress for lambda conversion-to-block operator.  Still need to implement the retain+autorelease outside of ARC, and there's a bug that causes the generated code to crash in ARC (which I think is unrelated to my code, although I'm not completely sure).

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

12 years agoDon't record nested macro expansions in the preprocessing record,
Argyrios Kyrtzidis [Sat, 25 Feb 2012 02:41:16 +0000 (02:41 +0000)]
Don't record nested macro expansions in the preprocessing record,
it can only bring pain when dealing with preprocessor abuse (see: boost).

rdar://10898986

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

12 years agoRetainCountChecker: don't adjust the retain count when analyzing a ReturnStmt unless...
Ted Kremenek [Sat, 25 Feb 2012 02:09:09 +0000 (02:09 +0000)]
RetainCountChecker: don't adjust the retain count when analyzing a ReturnStmt unless we are in the top-level call frame.  We can do more later, but this makes the checker self-consistent (and fixes a crash).

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

12 years ago[arcmt] GC migrator: don't try to remove redundant __strong, it does
Argyrios Kyrtzidis [Sat, 25 Feb 2012 01:57:42 +0000 (01:57 +0000)]
[arcmt] GC migrator: don't try to remove redundant __strong, it does
more harm than good.

Fixes rdar://10522805&10521433

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

12 years agoImprove the diagnostic in ARC mode when a conditional with an Objective-C type and...
Eli Friedman [Sat, 25 Feb 2012 00:23:44 +0000 (00:23 +0000)]
Improve the diagnostic in ARC mode when a conditional with an Objective-C type and void* is used.  <rdar://problem/10486347>.

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

12 years agoTrying to increase my Ohloh ranking with trivial tweaks
Douglas Gregor [Sat, 25 Feb 2012 00:16:17 +0000 (00:16 +0000)]
Trying to increase my Ohloh ranking with trivial tweaks

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

12 years agoBugfix: bogus warning -- "invalid use of non-static data member",
DeLesley Hutchins [Sat, 25 Feb 2012 00:11:55 +0000 (00:11 +0000)]
Bugfix: bogus warning -- "invalid use of non-static data member",
when a class is forward declared, and the reference to the data
member in question does not occur within a method body.

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

12 years agoSimplify check per Eli's comment
Douglas Gregor [Sat, 25 Feb 2012 00:06:47 +0000 (00:06 +0000)]
Simplify check per Eli's comment

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

12 years agoAdd test for C++ DR899.
Douglas Gregor [Fri, 24 Feb 2012 23:57:42 +0000 (23:57 +0000)]
Add test for C++ DR899.

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

12 years ago[analyzer] Malloc: reason about the ObjC messages and C++.
Anna Zaks [Fri, 24 Feb 2012 23:56:53 +0000 (23:56 +0000)]
[analyzer] Malloc: reason about the ObjC messages and C++.

Assume none of the ObjC messages defined in system headers free memory,
except for the ones containing 'freeWhenDone' selector. Currently, just
assume that the region escapes to the messages with 'freeWhenDone'
(ideally, we want to treat it as 'free()').

For now, always assume that regions escape when passed to C++ methods.

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

12 years agoImplement C++11 [over.match.copy]p1b2, which allows the use of
Douglas Gregor [Fri, 24 Feb 2012 23:56:31 +0000 (23:56 +0000)]
Implement C++11 [over.match.copy]p1b2, which allows the use of
explicit conversion functions to initialize the argument to a
copy/move constructor that itself is the subject of direct
initialization. Since we don't have that much context in overload
resolution, we end up threading more flags :(.

Fixes <rdar://problem/10903741> / PR10456.

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

12 years agoFix a stupid mistake in r151133. Reported to me by Joerg Sonnenberger.
Eli Friedman [Fri, 24 Feb 2012 23:53:49 +0000 (23:53 +0000)]
Fix a stupid mistake in r151133.  Reported to me by Joerg Sonnenberger.

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

12 years agoRemove FIXME: as Eli points out, the behavior here is now correct.
Richard Smith [Fri, 24 Feb 2012 23:21:24 +0000 (23:21 +0000)]
Remove FIXME: as Eli points out, the behavior here is now correct.

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

12 years agoFor the purposes of building LLVM types, a forward-declared
Douglas Gregor [Fri, 24 Feb 2012 22:40:36 +0000 (22:40 +0000)]
For the purposes of building LLVM types, a forward-declared
enumeration type with a fixed underlying type is complete. Fixes
<rdar://problem/10916155>.

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

12 years agoBack out __decltype warning from r151377: we should either warn on all the GNU
Richard Smith [Fri, 24 Feb 2012 22:30:04 +0000 (22:30 +0000)]
Back out __decltype warning from r151377: we should either warn on all the GNU
__keywords or none of them.

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

12 years agoMake helper static.
Benjamin Kramer [Fri, 24 Feb 2012 22:19:42 +0000 (22:19 +0000)]
Make helper static.

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

12 years agoWhen checking whether a reference to a variable is an ICE, look at the type of
Richard Smith [Fri, 24 Feb 2012 22:12:32 +0000 (22:12 +0000)]
When checking whether a reference to a variable is an ICE, look at the type of
the declaration, not at the type of the DeclRefExpr, since within a lambda the
DeclRefExpr can be more const than the declaration is.

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

12 years agoMinor modern rewriter bug showed up during testing
Fariborz Jahanian [Fri, 24 Feb 2012 21:42:38 +0000 (21:42 +0000)]
Minor modern rewriter bug showed up during testing
against a large project.

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

12 years agoC++11 [class.ctor]p5 says that
Douglas Gregor [Fri, 24 Feb 2012 21:25:53 +0000 (21:25 +0000)]
C++11 [class.ctor]p5 says that
  A defaulted default constructor for a class X is defined as deleted if [...]
    -  X is a union and all of its variant members are of const-qualified type.

A pedantic reading therefore says that

 union X { };

has a deleted default constructor, which is both silly and almost
certainly unintended. Pretend as if this this read

    - X is a union with one or more variant members, and all of its
      variant members are of const-qualified type.

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

12 years agoFix comment: correct predicate name, reformat comment.
Dmitri Gribenko [Fri, 24 Feb 2012 20:03:35 +0000 (20:03 +0000)]
Fix comment: correct predicate name, reformat comment.

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

12 years agoChange the text of a FIXME.
Argyrios Kyrtzidis [Fri, 24 Feb 2012 19:45:46 +0000 (19:45 +0000)]
Change the text of a FIXME.

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

12 years ago[libclang] Add a triple to the test.
Argyrios Kyrtzidis [Fri, 24 Feb 2012 19:45:42 +0000 (19:45 +0000)]
[libclang] Add a triple to the test.

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

12 years agocxx_status: Consistently refer to C++11 as "C++11", not as "C++'11" nor as
Richard Smith [Fri, 24 Feb 2012 18:42:08 +0000 (18:42 +0000)]
cxx_status: Consistently refer to C++11 as "C++11", not as "C++'11" nor as
"C++0x". Use "C++98" to refer to C++98, not "C++". Add heading for C++98
support section.

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

12 years agocxx_status: extended sizeof has been essentially complete for some time. As
Richard Smith [Fri, 24 Feb 2012 18:37:14 +0000 (18:37 +0000)]
cxx_status: extended sizeof has been essentially complete for some time. As
agreed on IRC, any remaining issues are best dealt with as bugs.

We have no __has_feature check for this; please shout if you'd like one. This
feature seems too small to be worth its own release notes bullet (again, please
shout if you disagree).

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

12 years agotest for writing modern ivar of struct type.
Fariborz Jahanian [Fri, 24 Feb 2012 18:17:50 +0000 (18:17 +0000)]
test for writing modern ivar of struct type.

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

12 years ago__decltype is a GNU extension, not a C++11 extension.
Richard Smith [Fri, 24 Feb 2012 18:10:23 +0000 (18:10 +0000)]
__decltype is a GNU extension, not a C++11 extension.

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

12 years agomore objective-c modern translator ivar tests.
Fariborz Jahanian [Fri, 24 Feb 2012 18:03:42 +0000 (18:03 +0000)]
more objective-c modern translator ivar tests.

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

12 years agoTwo minor, related fixes for template instantiation with blocks:
Douglas Gregor [Fri, 24 Feb 2012 17:41:38 +0000 (17:41 +0000)]
Two minor, related fixes for template instantiation with blocks:
  - Make sure that the block expression is instantiation-dependent if the
    block is in a dependent context
  - Make sure that the C++ 'this' expression gets captured even if we
  don't rebuild the AST node during template instantiation. This would
  also have manifested as a bug for lambdas.

Fixes <rdar://problem/10832617>.

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

12 years agoobjc modern translator. Fixes writing of block pointer ivar access.
Fariborz Jahanian [Fri, 24 Feb 2012 17:35:35 +0000 (17:35 +0000)]
objc modern translator. Fixes writing of block pointer ivar access.

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

12 years ago[analyzer] Run remove dead bindings before each call.
Anna Zaks [Fri, 24 Feb 2012 16:49:46 +0000 (16:49 +0000)]
[analyzer] Run remove dead bindings before each call.

This ensures that we report the bugs associated with symbols going
out of scope in the correct function context.

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

12 years ago[analyzer] We were silently stopping exploring the path after
Anna Zaks [Fri, 24 Feb 2012 16:49:41 +0000 (16:49 +0000)]
[analyzer] We were silently stopping exploring the path after
visiting 'return;' statement!

This most likely caused us to skip a bunch of code when analyzing with
inlining.

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

12 years agoUse -no-integrated-as only on ARM. The X86 and X86-64 integrated as have been
Rafael Espindola [Fri, 24 Feb 2012 16:22:39 +0000 (16:22 +0000)]
Use -no-integrated-as only on ARM. The X86 and X86-64 integrated as have been
the default for clang for some time now and can handle compiler-rt.

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

12 years agoRevert r151357. That unreachable is reachable...
Nick Lewycky [Fri, 24 Feb 2012 09:07:53 +0000 (09:07 +0000)]
Revert r151357. That unreachable is reachable...

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

12 years agoSilence gcc warnings pointing out that CharByteWidth could be used
Nick Lewycky [Fri, 24 Feb 2012 08:58:14 +0000 (08:58 +0000)]
Silence gcc warnings pointing out that CharByteWidth could be used
uninitialized. While there, restyle this function! No functionality change.

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

12 years agoSink variable into assert
Matt Beaumont-Gay [Fri, 24 Feb 2012 08:37:56 +0000 (08:37 +0000)]
Sink variable into assert

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

12 years agoRemove some trivial uses of hasTrivialCopyConstructor() and
Douglas Gregor [Fri, 24 Feb 2012 07:55:51 +0000 (07:55 +0000)]
Remove some trivial uses of hasTrivialCopyConstructor() and
hasTrivialMoveConstructor().

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

12 years agoKill a spurious use of hasTrivialDefaultConstructor()
Douglas Gregor [Fri, 24 Feb 2012 07:48:37 +0000 (07:48 +0000)]
Kill a spurious use of hasTrivialDefaultConstructor()

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

12 years agoImplement a new type trait __is_trivially_constructible(T, Args...)
Douglas Gregor [Fri, 24 Feb 2012 07:38:34 +0000 (07:38 +0000)]
Implement a new type trait __is_trivially_constructible(T, Args...)
that provides the behavior of the C++11 library trait
std::is_trivially_constructible<T, Args...>, which can't be
implemented purely as a library.

Since __is_trivially_constructible can have zero or more arguments, I
needed to add Yet Another Type Trait Expression Class, this one
handling arbitrary arguments. The next step will be to migrate
UnaryTypeTrait and BinaryTypeTrait over to this new, more general
TypeTrait class.

Fixes the Clang side of <rdar://problem/10895483> / PR12038.

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

12 years agoMake PathDiagnosticBuilder sensitive to varying LocationContexts, thus fixing a bug...
Ted Kremenek [Fri, 24 Feb 2012 07:12:52 +0000 (07:12 +0000)]
Make PathDiagnosticBuilder sensitive to varying LocationContexts, thus fixing a bug in the inlining diagnostics where the wrong location could be used.

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

12 years agoRemove stray path in test file.
Ted Kremenek [Fri, 24 Feb 2012 06:01:01 +0000 (06:01 +0000)]
Remove stray path in test file.

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

12 years agoReapply r151317, but when computing the PathDiagnostic profile and size keep into...
Ted Kremenek [Fri, 24 Feb 2012 06:00:00 +0000 (06:00 +0000)]
Reapply r151317, but when computing the PathDiagnostic profile and size keep into account the nested structure.  Also fix a problem with how
inlining impacted Plist diagnostics, and adjust some ranges in the Plist output due to richer information.

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

12 years agoFix test for non-block-default platforms.
David Blaikie [Fri, 24 Feb 2012 04:20:32 +0000 (04:20 +0000)]
Fix test for non-block-default platforms.

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

12 years agoRevert r151317 - Rework PathDiagnostics creation.. - to appease buildbots.
Chad Rosier [Fri, 24 Feb 2012 02:06:33 +0000 (02:06 +0000)]
Revert r151317 - Rework PathDiagnostics creation.. - to appease buildbots.

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

12 years ago[PCH] When keeping track of top-level decls for "targeted deserialization"
Argyrios Kyrtzidis [Fri, 24 Feb 2012 01:12:38 +0000 (01:12 +0000)]
[PCH] When keeping track of top-level decls for "targeted deserialization"
make sure we don't mistake ParmVarDecls for top-level decls.

Fixes rdar://10920009.

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

12 years agoRework PathDiagnostic creation so that call stacks are captured by a nested PathDiagn...
Ted Kremenek [Fri, 24 Feb 2012 00:38:56 +0000 (00:38 +0000)]
Rework PathDiagnostic creation so that call stacks are captured by a nested PathDiagnosticCallPiece.

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

12 years agoAdd an ivar test for modern objc abi translator.
Fariborz Jahanian [Fri, 24 Feb 2012 00:34:58 +0000 (00:34 +0000)]
Add an ivar test for modern objc abi translator.

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

12 years agoMake test works with FileCheck.
Fariborz Jahanian [Fri, 24 Feb 2012 00:29:20 +0000 (00:29 +0000)]
Make test works with FileCheck.

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

12 years agoReapply r151172 - Unwind path cleanup for array new list initializers - with a
Chad Rosier [Fri, 24 Feb 2012 00:13:55 +0000 (00:13 +0000)]
Reapply r151172 - Unwind path cleanup for array new list initializers - with a
test case that only runs on debug builds.

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

12 years agoHandle "#pragma GCC visibility" in a few more places. Switch over "#pragma pack...
Eli Friedman [Thu, 23 Feb 2012 23:47:16 +0000 (23:47 +0000)]
Handle "#pragma GCC visibility" in a few more places.  Switch over "#pragma pack" to use the same handling that gcc does.  Fixes <rdar://problem/10871094> and <rdar://problem/10893316>.

(Hopefully, common usage of these pragmas isn't irregular enough to break our current handling.  Doug has ideas for a more crazy approach if necessary.)

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

12 years agoModernize some code which processes CastExprs to use CastKinds. No intended function...
Eli Friedman [Thu, 23 Feb 2012 23:04:32 +0000 (23:04 +0000)]
Modernize some code which processes CastExprs to use CastKinds.  No intended functional change.

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

12 years ago[analyzer] KeyChainAPI: unique the leaks by allocation site.
Anna Zaks [Thu, 23 Feb 2012 22:53:29 +0000 (22:53 +0000)]
[analyzer] KeyChainAPI: unique the leaks by allocation site.
(Very similar to the previous change in malloc.)

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

12 years agoobjective-c++: Type of an objc string literal is NSString, not 'id'.
Fariborz Jahanian [Thu, 23 Feb 2012 22:51:36 +0000 (22:51 +0000)]
objective-c++: Type of an objc string literal is NSString, not 'id'.
// rdar://10907410

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

12 years agoTurned on support for __declspecs: noreturn, noinline, nothrow and naked in MS compat...
Aaron Ballman [Thu, 23 Feb 2012 22:46:33 +0000 (22:46 +0000)]
Turned on support for __declspecs: noreturn, noinline, nothrow and naked in MS compatibility mode.

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

12 years agoPull the OpaqueValueExpr's source expression into its constructor, so
Douglas Gregor [Thu, 23 Feb 2012 22:17:26 +0000 (22:17 +0000)]
Pull the OpaqueValueExpr's source expression into its constructor, so
that we can correctly compute value-dependence of the OVE.

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

12 years agoUpdate test for r151288
Jim Grosbach [Thu, 23 Feb 2012 22:12:53 +0000 (22:12 +0000)]
Update test for r151288

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

12 years agoARM: enable the integrated assembler by default for Darwin.
Jim Grosbach [Thu, 23 Feb 2012 21:55:04 +0000 (21:55 +0000)]
ARM: enable the integrated assembler by default for Darwin.

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

12 years ago[analyzer] Malloc: unique leak reports by allocation site.
Anna Zaks [Thu, 23 Feb 2012 21:38:21 +0000 (21:38 +0000)]
[analyzer] Malloc: unique leak reports by allocation site.

When we find two leak reports with the same allocation site, report only
one of them.

Provide a helper method to BugReporter to facilitate this.

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

12 years ago[analyzer] Add CString checks to the release notes.
Anna Zaks [Thu, 23 Feb 2012 21:38:14 +0000 (21:38 +0000)]
[analyzer] Add CString checks to the release notes.

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

12 years ago[libclang] Make sure that all top-level decls in a @implementation are
Argyrios Kyrtzidis [Thu, 23 Feb 2012 21:11:20 +0000 (21:11 +0000)]
[libclang] Make sure that all top-level decls in a @implementation are
marked as such.

Previously we missed tag declarations; fixes rdar://10902015

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

12 years agoTest is fixed.
Fariborz Jahanian [Thu, 23 Feb 2012 20:43:56 +0000 (20:43 +0000)]
Test is fixed.

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

12 years agoXFAIL test until I figure out how to make test pass on different platforms.
Fariborz Jahanian [Thu, 23 Feb 2012 20:22:21 +0000 (20:22 +0000)]
XFAIL test until I figure out how to make test pass on different platforms.

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

12 years ago* tgmath_logb.patch implements the missing logb function (see C99 standard 7.22,...
Howard Hinnant [Thu, 23 Feb 2012 20:22:10 +0000 (20:22 +0000)]
* tgmath_logb.patch implements the missing logb function (see C99 standard 7.22, paragraph 5). * tgmath_fabs_complex.patch corrects the return types for the complex fabs functions. These must be non-complex float/double/long double (see C99 standard 7.22, paragraph 4 and 7.3.8.1).  Patch contributed by Kristof Beyls.

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

12 years agoChange test again so it passes in build-bot until I can figure out what is
Fariborz Jahanian [Thu, 23 Feb 2012 20:07:38 +0000 (20:07 +0000)]
Change test again so it passes in build-bot until I can figure out what is
going on.

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

12 years agofix test for patch in r151268.
Fariborz Jahanian [Thu, 23 Feb 2012 18:57:03 +0000 (18:57 +0000)]
fix test for patch in r151268.

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

12 years agoActually remove the duplicated elements from the vector.
Benjamin Kramer [Thu, 23 Feb 2012 18:35:56 +0000 (18:35 +0000)]
Actually remove the duplicated elements from the vector.

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

12 years agoobjective-c default synthesis. classes which adopt protocol properties
Fariborz Jahanian [Thu, 23 Feb 2012 18:21:25 +0000 (18:21 +0000)]
objective-c default synthesis. classes which adopt protocol properties
must still auto synthesize those propeties which have been redeclared
in the class. // rdar://10907410

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

12 years agoFix indentation
Douglas Gregor [Thu, 23 Feb 2012 17:54:00 +0000 (17:54 +0000)]
Fix indentation

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

12 years agoNote that lambda expressions are available in the release notes for 3.1
Douglas Gregor [Thu, 23 Feb 2012 17:51:51 +0000 (17:51 +0000)]
Note that lambda expressions are available in the release notes for 3.1

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

12 years agoReplace a use of hasTrivialDefaultConstructor() with the appropriate
Douglas Gregor [Thu, 23 Feb 2012 17:07:43 +0000 (17:07 +0000)]
Replace a use of hasTrivialDefaultConstructor() with the appropriate
isTrivial() call.

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

12 years agoReplace some DenseSets with SmallPtrSets. Apart from the "small" optimization, the...
Benjamin Kramer [Thu, 23 Feb 2012 16:06:01 +0000 (16:06 +0000)]
Replace some DenseSets with SmallPtrSets. Apart from the "small" optimization, the current implementation is also a denser.

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

12 years agoUnique CXXBasePath decls with the SmallVector/pod_sort/std::unique idiom instead...
Benjamin Kramer [Thu, 23 Feb 2012 15:18:31 +0000 (15:18 +0000)]
Unique CXXBasePath decls with the SmallVector/pod_sort/std::unique idiom instead of employing a wasteful std::set.

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

12 years agoReplace the std::map in the init list checker with a DenseMap to reduce malloc thrashing.
Benjamin Kramer [Thu, 23 Feb 2012 14:48:40 +0000 (14:48 +0000)]
Replace the std::map in the init list checker with a DenseMap to reduce malloc thrashing.

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

12 years agoPR12067: When emitting an evaluated constant structure in C++11 mode, don't
Richard Smith [Thu, 23 Feb 2012 08:33:23 +0000 (08:33 +0000)]
PR12067: When emitting an evaluated constant structure in C++11 mode, don't
forget the vptrs.

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

12 years agoSeriously, are injected-class-names that hard?
Douglas Gregor [Thu, 23 Feb 2012 07:44:18 +0000 (07:44 +0000)]
Seriously, are injected-class-names that hard?

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

12 years agoProvide the __is_trivially_assignable type trait, which provides
Douglas Gregor [Thu, 23 Feb 2012 07:33:15 +0000 (07:33 +0000)]
Provide the __is_trivially_assignable type trait, which provides
compiler support for the std::is_trivially_assignable library type
trait.

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

12 years agoClang supports lambdas.
Douglas Gregor [Thu, 23 Feb 2012 05:44:09 +0000 (05:44 +0000)]
Clang supports lambdas.

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

12 years agoTwo fixes to how we compute visibility:
Rafael Espindola [Thu, 23 Feb 2012 04:17:32 +0000 (04:17 +0000)]
Two fixes to how we compute visibility:

* Handle some situations where we should never make a decl more visible,
  even when merging in an explicit visibility.

* Handle attributes in members of classes that are explicitly specialized.

Thanks Nico for the report and testing, Eric for the initial review, and dgregor
for the awesome test27 :-)

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

12 years agoTweak C++ status table:
Douglas Gregor [Thu, 23 Feb 2012 03:10:24 +0000 (03:10 +0000)]
Tweak C++ status table:
  - Apparently, SVN is yellow
  - Note that initializer lists are "in progress"

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

12 years agoClang now supports lambda expressions.
Douglas Gregor [Thu, 23 Feb 2012 03:02:32 +0000 (03:02 +0000)]
Clang now supports lambda expressions.

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

12 years agoTry to handle qualifiers more consistently for array InitListExprs. Fixes <rdar...
Eli Friedman [Thu, 23 Feb 2012 02:25:10 +0000 (02:25 +0000)]
Try to handle qualifiers more consistently for array InitListExprs.  Fixes <rdar://problem/10907510>, and makes the ASTs a bit more self-consistent.

(I've chosen to keep the qualifiers, but it isn't a strong preference; if anyone prefers removing them, please yell.)

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

12 years agoUpdate parser's disambiguation to cope with braced function-style casts in
Richard Smith [Thu, 23 Feb 2012 01:36:12 +0000 (01:36 +0000)]
Update parser's disambiguation to cope with braced function-style casts in
C++11, and with braced-init-list initializers in conditions. This exposed an
ambiguity with enum underlying types versus bitfields, which we resolve by
treating 'enum E : T {' as always defining an enumeration (even if it would
only successfully parse as a bitfield). This appears to be g++ compatible.

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

12 years agoTurned on support for __declspec(deprecated) in MS compatibility mode.
Aaron Ballman [Thu, 23 Feb 2012 01:19:31 +0000 (01:19 +0000)]
Turned on support for __declspec(deprecated) in MS compatibility mode.

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

12 years ago[analyzer] Invalidate the region passed to pthread_setspecific() call.
Anna Zaks [Thu, 23 Feb 2012 01:05:27 +0000 (01:05 +0000)]
[analyzer] Invalidate the region passed to pthread_setspecific() call.

Make this call an exception in ExprEngine::invalidateArguments:
'int pthread_setspecific(ptheread_key k, const void *)' stores
a value into thread local storage. The value can later be retrieved
with 'void *ptheread_getspecific(pthread_key)'. So even thought the
parameter is 'const void *', the region escapes through the
call.

(Here we just blacklist the call in the ExprEngine's default
logic. Another option would be to add a checker which evaluates
the call and triggers the call to invalidate regions.)

Teach the Malloc Checker, which treats all system calls as safe about
the API.

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

12 years agoTweak release note comments for checker build.
Ted Kremenek [Thu, 23 Feb 2012 00:48:17 +0000 (00:48 +0000)]
Tweak release note comments for checker build.

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

12 years agoUpdate checker build to checker-261.
Ted Kremenek [Thu, 23 Feb 2012 00:47:09 +0000 (00:47 +0000)]
Update checker build to checker-261.

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

12 years agoAdd a quick TODO.
Eric Christopher [Thu, 23 Feb 2012 00:43:12 +0000 (00:43 +0000)]
Add a quick TODO.

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

12 years agoFold debug scope emission into the cleanup scope.
Eric Christopher [Thu, 23 Feb 2012 00:43:07 +0000 (00:43 +0000)]
Fold debug scope emission into the cleanup scope.

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

12 years agoanother test for modern ivar access rewrite.
Fariborz Jahanian [Wed, 22 Feb 2012 22:32:05 +0000 (22:32 +0000)]
another test for modern ivar access rewrite.

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

12 years agoRevert r151172: Unwind path cleanup for array new list initializers.
Chad Rosier [Wed, 22 Feb 2012 21:36:06 +0000 (21:36 +0000)]
Revert r151172: Unwind path cleanup for array new list initializers.

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

12 years agomore tests for modern objc translator.
Fariborz Jahanian [Wed, 22 Feb 2012 21:13:49 +0000 (21:13 +0000)]
more tests for modern objc translator.

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

12 years agoImprove placement of clang crash diagnostics section.
Chad Rosier [Wed, 22 Feb 2012 20:26:10 +0000 (20:26 +0000)]
Improve placement of clang crash diagnostics section.

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

12 years ago[analyzer] Malloc cleanup:
Anna Zaks [Wed, 22 Feb 2012 19:24:52 +0000 (19:24 +0000)]
[analyzer] Malloc cleanup:
 - We should not evaluate strdup in the Malloc Checker, it's the job of
CString checker, so just update the RefState to reflect allocated
memory.

- Refactor to reduce LOC: remove some wrapper auxiliary functions, make
all functions return the state and add the transition in one place
(instead of in each auxiliary function).

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

12 years agoRevert part of r148839 and keep DefaultTargetTriple in the form adjusted
Joerg Sonnenberger [Wed, 22 Feb 2012 19:15:16 +0000 (19:15 +0000)]
Revert part of r148839 and keep DefaultTargetTriple in the form adjusted
by -target and similar options. As discussed in PR 12026, the change
broke support for target-prefixed tools, i.e. calling x86_64--linux-ld
when compiling for x86_64--linux. Improve the test cases added
originally in r149083 to not require execution, just executable files.
Document the hack with appropiate FIXME comments.

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

12 years agoAdd clang crash diagnostic info and associated flags to Clang user manual.
Chad Rosier [Wed, 22 Feb 2012 19:14:46 +0000 (19:14 +0000)]
Add clang crash diagnostic info and associated flags to Clang user manual.

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

12 years agoUpdate set-xcode-analyzer to work with Xcode repackaging in Xcode 4.3
Ted Kremenek [Wed, 22 Feb 2012 18:44:35 +0000 (18:44 +0000)]
Update set-xcode-analyzer to work with Xcode repackaging in Xcode 4.3

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

12 years agoAdd new driver warning from r151174 to a warning group. Please let me know if this...
Chad Rosier [Wed, 22 Feb 2012 18:18:48 +0000 (18:18 +0000)]
Add new driver warning from r151174 to a warning group.  Please let me know if this isn't the appropriate grouping.

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

12 years agomodern objc translator. more writing of modern ivar access
Fariborz Jahanian [Wed, 22 Feb 2012 18:13:25 +0000 (18:13 +0000)]
modern objc translator. more writing of modern ivar access
abi.

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