]> granicus.if.org Git - clang/log
clang
12 years agopinpoint name/location of deprecated/unavailable enumerator
Fariborz Jahanian [Mon, 28 Nov 2011 19:45:58 +0000 (19:45 +0000)]
pinpoint name/location of deprecated/unavailable enumerator
whose enum has been made deprecated/unavailable in the warning.
// rdar://10201690

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

12 years agoAdd a proper blurb for the PPCallbacks features.
Chandler Carruth [Mon, 28 Nov 2011 19:17:25 +0000 (19:17 +0000)]
Add a proper blurb for the PPCallbacks features.

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

12 years agoThis doesn't really seem worthy of a relnote... Shout if you disagree!
Chandler Carruth [Mon, 28 Nov 2011 19:11:25 +0000 (19:11 +0000)]
This doesn't really seem worthy of a relnote... Shout if you disagree!

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

12 years agoFill in a section for the instantiation -> expansion rename. Not great,
Chandler Carruth [Mon, 28 Nov 2011 19:06:34 +0000 (19:06 +0000)]
Fill in a section for the instantiation -> expansion rename. Not great,
but better.

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

12 years agoAdd proper text for the Diagnostic API changes.
Chandler Carruth [Mon, 28 Nov 2011 18:55:47 +0000 (18:55 +0000)]
Add proper text for the Diagnostic API changes.

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

12 years agoobjc: turn warning for property type mismatch in
Fariborz Jahanian [Mon, 28 Nov 2011 18:38:27 +0000 (18:38 +0000)]
objc: turn warning for property type mismatch in
primary and its continuation class into error.
// rdar://10142679

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

12 years agoAdd a release note for Objective-C related result types
Douglas Gregor [Mon, 28 Nov 2011 17:51:39 +0000 (17:51 +0000)]
Add a release note for Objective-C related result types

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

12 years agoNote that code completion now works better for in-class member functions
Douglas Gregor [Mon, 28 Nov 2011 17:50:36 +0000 (17:50 +0000)]
Note that code completion now works better for in-class member functions

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

12 years agoWhen checking a call to a builtin atomic operation, be sure to
Douglas Gregor [Mon, 28 Nov 2011 16:30:08 +0000 (16:30 +0000)]
When checking a call to a builtin atomic operation, be sure to
consider the _<width> variants as well, which we'll see if we're
performing the type checking in a template instantiation where the
call expression itself was originally not type-dependent. Fixes
PR11411.

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

12 years agoAnd that completes my sweep through commits for things that might be
Chandler Carruth [Mon, 28 Nov 2011 13:02:29 +0000 (13:02 +0000)]
And that completes my sweep through commits for things that might be
worth noting in the release notes. These remain raw notes. I'll be
re-writing them into nice prose first thing tomorrow, with help from
others. A couple of notes for any reading the commits:

If you don't see something that should be mentioned, feel free to add
a note (or even a nicely written section) about it! I haven't really
done the static analyzer justice here as I don't really know what the
significant changes are other than mile-high stuff like watching it grow
C++ support and a more robust CFG. I also worry I've missed important
stuff in the Objective-C world.

If you see something that isn't worth mentioning, just delete it. I know
there are several things like this. I plan to prune the list down as
I flesh things out.

If you're name or email is on a bullet, I'll likely be sending you an
email asking for any input on that subject. For many of these I can fill
in something generic, and I'll just want you to give it a once-over.
However, if you have time, feel free to just write the blurb yourself
and drop it in, or drop it in an email to me.

Finally, *WOW* has a lot happened in Clang... I shouldn't have dreaded
(and put off) this so much, it was kind of awesome to go back and watch
the evolution. Anyways, these should be in a reasonable draft state
early tomorrow.

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

12 years agoFinished with August's commits, and actually added a clearly missing
Chandler Carruth [Mon, 28 Nov 2011 12:24:23 +0000 (12:24 +0000)]
Finished with August's commits, and actually added a clearly missing
section on libclang.

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

12 years agoJuly's notes..
Chandler Carruth [Mon, 28 Nov 2011 12:24:21 +0000 (12:24 +0000)]
July's notes..

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

12 years agoRemoved useless ImplicitCast nodes in explicit cstyle and static casts
Nicola Gigante [Mon, 28 Nov 2011 12:21:57 +0000 (12:21 +0000)]
Removed useless ImplicitCast nodes in explicit cstyle and static casts

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

12 years agoJuly was a bit quiet to... except for ARC. ;]
Chandler Carruth [Mon, 28 Nov 2011 11:27:33 +0000 (11:27 +0000)]
July was a bit quiet to... except for ARC. ;]

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

12 years agoJune was a quiet month... I can't imagine why... ;]
Chandler Carruth [Mon, 28 Nov 2011 10:57:14 +0000 (10:57 +0000)]
June was a quiet month... I can't imagine why... ;]

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

12 years agoNotes through another month... a *really* busy month, but mostly bug
Chandler Carruth [Mon, 28 Nov 2011 09:43:30 +0000 (09:43 +0000)]
Notes through another month... a *really* busy month, but mostly bug
fixing.

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

12 years agoAdd the first month's commit notes.
Chandler Carruth [Mon, 28 Nov 2011 08:41:06 +0000 (08:41 +0000)]
Add the first month's commit notes.

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

12 years agoInstall c-index-test and clang-c/Index.h as internal files. rdar://10217046
Bob Wilson [Mon, 28 Nov 2011 08:03:54 +0000 (08:03 +0000)]
Install c-index-test and clang-c/Index.h as internal files. rdar://10217046

Specify that these files should be installed to the optional internal
install location as specified by configure's --with-internal-prefix.
If that option is not used, they'll be installed to the default prefix
as before.

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

12 years agoBegin sketching out the Clang release notes. The plan is to link to
Chandler Carruth [Mon, 28 Nov 2011 07:16:19 +0000 (07:16 +0000)]
Begin sketching out the Clang release notes. The plan is to link to
these more detailed notes from the primary LLVM release notes for Clang.
This gives us a nice place to flesh out in plenty of detail the major
changes that have happened in Clang land since 2.9.

I've outlined a very rough structure based on the LLVM release notes
structure and what seems like useful divisions in the Clang landscape
(e.g., language-specific stuff is relevant to a narrower audience).

I'll be first converting my brain-dump-ish notes from the commit logs,
and then cleaning here. Suggestions on structure welcome. Typo
corrections, spelling fixes (oh how I'll need them), all welcome; just
commit away.

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

12 years agotest/lit.cfg: Enhance getRegisteredTargets() to retrieve +Asserts.
NAKAMURA Takumi [Mon, 28 Nov 2011 05:09:42 +0000 (05:09 +0000)]
test/lit.cfg: Enhance getRegisteredTargets() to retrieve +Asserts.

  - s/getRegisteredTargets/get_llc_props/g
  - get_llc_props() returns dict {"set_of_targets", "enable_assertions"}
  - Enable the feature "asserts".
    test/Driver/darwin-verify-debug.c had expected it.

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

12 years ago[libclang] Indexing API: If the client requested to get a CXTranslationUnit after
Argyrios Kyrtzidis [Mon, 28 Nov 2011 04:56:00 +0000 (04:56 +0000)]
[libclang] Indexing API: If the client requested to get a CXTranslationUnit after
indexing, honor all the TU options.

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

12 years ago[libclang] Indexing API: Capture diagnostics during indexing.
Argyrios Kyrtzidis [Mon, 28 Nov 2011 04:55:55 +0000 (04:55 +0000)]
[libclang] Indexing API: Capture diagnostics during indexing.

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

12 years agoAnother silly workaround for MSVC.
Peter Collingbourne [Mon, 28 Nov 2011 04:29:10 +0000 (04:29 +0000)]
Another silly workaround for MSVC.

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

12 years ago[arcmt] Integrate GC __weak into property attributes even when we don't have
Argyrios Kyrtzidis [Mon, 28 Nov 2011 02:04:36 +0000 (02:04 +0000)]
[arcmt] Integrate GC __weak into property attributes even when we don't have
the implementation.

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

12 years agoSigh, another workaround for MSVC.
Peter Collingbourne [Mon, 28 Nov 2011 00:41:08 +0000 (00:41 +0000)]
Sigh, another workaround for MSVC.

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

12 years ago[arcmt] Don't add __weak if there is already a GC __weak and make sure to clear
Argyrios Kyrtzidis [Mon, 28 Nov 2011 00:23:12 +0000 (00:23 +0000)]
[arcmt] Don't add __weak if there is already a GC __weak and make sure to clear
__weak from a readonly property.

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

12 years agoWork around a gcc4.2 bug.
Peter Collingbourne [Mon, 28 Nov 2011 00:18:21 +0000 (00:18 +0000)]
Work around a gcc4.2 bug.

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

12 years agoIn Sema::MaybeBindToTemporary, create a CXXBindTemporaryExpr for an
Peter Collingbourne [Sun, 27 Nov 2011 22:09:28 +0000 (22:09 +0000)]
In Sema::MaybeBindToTemporary, create a CXXBindTemporaryExpr for an
array of objects with non-trivial destructors.  PR11365.

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

12 years agoWhen destroying temporaries, instead of a custom cleanup use the
Peter Collingbourne [Sun, 27 Nov 2011 22:09:22 +0000 (22:09 +0000)]
When destroying temporaries, instead of a custom cleanup use the
generic pushDestroy function.

This would reduce the number of useful declarations in
CGTemporaries.cpp to one.  Since CodeGenFunction::EmitCXXTemporary
does not deserve its own file, move it to CGCleanup.cpp and delete
CGTemporaries.cpp.

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

12 years agoMake our handling of MMX x SSE closer to what gcc does:
Rafael Espindola [Sun, 27 Nov 2011 20:00:43 +0000 (20:00 +0000)]
Make our handling of MMX x SSE closer to what gcc does:

* Enabling sse enables mmx.
* Disabling (-mno-mmx) mmx, doesn't disable sse (we got this right already).
* The order in not important. -msse -mno-mmx is the same as -mno-mmx -msse.

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

12 years agoAdd inreg attributes to reference arguments.
Rafael Espindola [Sun, 27 Nov 2011 18:35:39 +0000 (18:35 +0000)]
Add inreg attributes to reference arguments.

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

12 years agoReference initialization with initializer lists.
Sebastian Redl [Sun, 27 Nov 2011 16:50:07 +0000 (16:50 +0000)]
Reference initialization with initializer lists.

This supports single-element initializer lists for references according to DR1288, as well as creating temporaries and binding to them for other initializer lists.

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

12 years agoError on non x86 architectures.
Rafael Espindola [Sun, 27 Nov 2011 15:21:33 +0000 (15:21 +0000)]
Error on non x86 architectures.

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

12 years agoFix file name in comments.
Rafael Espindola [Sun, 27 Nov 2011 15:13:54 +0000 (15:13 +0000)]
Fix file name in comments.

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

12 years agoUse libcxx makefile's do-installhdrs target. <rdar://problem/10397739>
Bob Wilson [Sun, 27 Nov 2011 06:13:25 +0000 (06:13 +0000)]
Use libcxx makefile's do-installhdrs target.  <rdar://problem/10397739>

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

12 years agoAdd the minimum implementation of cpuid.h. This works on "modern" intel cpus
Rafael Espindola [Sat, 26 Nov 2011 20:53:19 +0000 (20:53 +0000)]
Add the minimum implementation of cpuid.h. This works on "modern" intel cpus
and on clang, which seams to handled "=b" correctly even when ebx is the
PIC register.

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

12 years agoTest commit
Nicola Gigante [Sat, 26 Nov 2011 16:20:01 +0000 (16:20 +0000)]
Test commit

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

12 years agoFixed lexical declaration context when instantiating a friend / out-of-line class...
Abramo Bagnara [Sat, 26 Nov 2011 13:33:46 +0000 (13:33 +0000)]
Fixed lexical declaration context when instantiating a friend / out-of-line class template member.

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

12 years agoSet __OPTIMIZE_SIZE__ on -Os and -Oz. This matches gcc's behaviour on both OS X
Rafael Espindola [Sat, 26 Nov 2011 06:21:20 +0000 (06:21 +0000)]
Set __OPTIMIZE_SIZE__ on -Os and -Oz. This matches gcc's behaviour on both OS X
and linux.

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

12 years agoIn Microsoft mode, make "Unqualified lookup into dependent bases of class templates...
Francois Pichet [Fri, 25 Nov 2011 01:10:54 +0000 (01:10 +0000)]
In Microsoft mode, make "Unqualified lookup into dependent bases of class templates" works  inside a friend function definition at class scope.

Basically we have to look into the parent *lexical* DeclContext for friend functions at class scope. That's because calling GetParent() return the namespace or file DeclContext.

This fixes all remaining cases of "Unqualified lookup into dependent bases of class templates" when parsing MFC code with clang.

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

12 years agoFix typo (becuase->because), PR11427
David Blaikie [Thu, 24 Nov 2011 00:37:54 +0000 (00:37 +0000)]
Fix typo (becuase->because), PR11427

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

12 years agoWordsmith the -Warray-bounds diagnostic text a bit
Matt Beaumont-Gay [Thu, 24 Nov 2011 00:27:38 +0000 (00:27 +0000)]
Wordsmith the -Warray-bounds diagnostic text a bit

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

12 years agoAdd feature to diagnostics that will provide more information on function
Richard Trieu [Wed, 23 Nov 2011 22:32:32 +0000 (22:32 +0000)]
Add feature to diagnostics that will provide more information on function
pointer mismatch.  Cases covered are: initialization, assignment, and function
arguments.  Additional text will give the extra information about the nature
of the mismatch: different classes for member functions, wrong number of
parameters, different parameter type, different return type, and function
qualifier mismatch.

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

12 years ago[PCH] Check for isTopLevelDeclInObjCContainer when picking abbreviations.
Argyrios Kyrtzidis [Wed, 23 Nov 2011 21:11:23 +0000 (21:11 +0000)]
[PCH] Check for isTopLevelDeclInObjCContainer when picking abbreviations.

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

12 years ago[libclang] Fix operations (token annotation, getting cursor, etc.) with a file region
Argyrios Kyrtzidis [Wed, 23 Nov 2011 20:27:36 +0000 (20:27 +0000)]
[libclang] Fix operations (token annotation, getting cursor, etc.) with a file region
inside an objc container that "contains" other file-level declarations.

When getting the array of file-level declarations that overlap with a file region,
we failed to report that the region overlaps with an objc container, if
the container had other file-level declarations declared lexically inside it.

Fix this by marking such declarations as "isTopLevelDeclInObjCContainer" in the AST
and handling them appropriately.

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

12 years agoRemove an assertion that is not valid if we cancel parsing.
Argyrios Kyrtzidis [Wed, 23 Nov 2011 20:27:29 +0000 (20:27 +0000)]
Remove an assertion that is not valid if we cancel parsing.

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

12 years ago[libclang] Indexing API: Fix issues, mostly C++ related.
Argyrios Kyrtzidis [Wed, 23 Nov 2011 20:27:26 +0000 (20:27 +0000)]
[libclang] Indexing API: Fix issues, mostly C++ related.

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

12 years agoAAPCS compliance - 32-bit wchar_t should be unsigned for both aapcs and aapcs-linux.
James Molloy [Wed, 23 Nov 2011 13:35:08 +0000 (13:35 +0000)]
AAPCS compliance - 32-bit wchar_t should be unsigned for both aapcs and aapcs-linux.

Original behaviour of defining wchar_t as signed int has been kept for apcs-gnu as I don't have any spec for this to validate against.

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

12 years agoDon't check alignment, it's irrelevant to this test.
Richard Smith [Wed, 23 Nov 2011 02:12:00 +0000 (02:12 +0000)]
Don't check alignment, it's irrelevant to this test.

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

12 years agoUse static storage duration for file-scope compound literals, even when they
Richard Smith [Tue, 22 Nov 2011 22:48:32 +0000 (22:48 +0000)]
Use static storage duration for file-scope compound literals, even when they
appear in non-constant initializers in C++.

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

12 years agoRemove assert from hot code path and add a clarifying comment.
Benjamin Kramer [Tue, 22 Nov 2011 20:39:31 +0000 (20:39 +0000)]
Remove assert from hot code path and add a clarifying comment.

The assert wasn't adding much value but slowed down Release+Asserts builds.

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

12 years agoProvide better source info for template specializations with non-type arguments.
Matt Beaumont-Gay [Tue, 22 Nov 2011 20:00:10 +0000 (20:00 +0000)]
Provide better source info for template specializations with non-type arguments.

This fixes a crasher in tools like Include-What-You-Use which examine such
arguments. Patch from Dean Sturtevant at Google!

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

12 years agoLexer: Don't throw away the hard work SSE did to find a slash.
Benjamin Kramer [Tue, 22 Nov 2011 18:56:46 +0000 (18:56 +0000)]
Lexer: Don't throw away the hard work SSE did to find a slash.

We can reuse the information and avoid looping over all the bytes again.

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

12 years ago[libclang] Indexing API: Support C++ symbols.
Argyrios Kyrtzidis [Tue, 22 Nov 2011 07:24:51 +0000 (07:24 +0000)]
[libclang] Indexing API: Support C++ symbols.

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

12 years agoimplement __has_feature(address_sanitizer); also use LangOpts.AddressSanitizer instea...
Kostya Serebryany [Tue, 22 Nov 2011 01:28:36 +0000 (01:28 +0000)]
implement __has_feature(address_sanitizer); also use LangOpts.AddressSanitizer instead of CodeGenOpts.AddressSanitizer

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

12 years agoUn-XFAIL this test on Darwin, it reportedly passes now.
Peter Collingbourne [Mon, 21 Nov 2011 21:56:51 +0000 (21:56 +0000)]
Un-XFAIL this test on Darwin, it reportedly passes now.

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

12 years agoAdd stub section to the user manual for C++ language features, and document
Richard Smith [Mon, 21 Nov 2011 20:54:59 +0000 (20:54 +0000)]
Add stub section to the user manual for C++ language features, and document
-ftemplate-depth= and -fconstexpr-depth= in it.

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

12 years agoAdd driver arguments -ftemplate-depth=N and -fconstexpr-depth=N, with the same
Richard Smith [Mon, 21 Nov 2011 19:36:32 +0000 (19:36 +0000)]
Add driver arguments -ftemplate-depth=N and -fconstexpr-depth=N, with the same
semantics and defaults as the corresponding g++ arguments. The historical g++
argument -ftemplate-depth-N is kept for compatibility, but modern g++ versions
no longer document that option.

Add -cc1 argument -fconstexpr-depth N to implement the corresponding
functionality.

The -ftemplate-depth=N part of this fixes PR9890.

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

12 years agoChange the linker emulation name for FreeBSD/PPC32.
Roman Divacky [Mon, 21 Nov 2011 16:50:32 +0000 (16:50 +0000)]
Change the linker emulation name for FreeBSD/PPC32.

Submitted by Andreas Tobler!

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

12 years agoCodeGen: Simplify code.
Benjamin Kramer [Mon, 21 Nov 2011 15:47:23 +0000 (15:47 +0000)]
CodeGen: Simplify code.

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

12 years agoDelete the depfile if we could not open a header file. We cannot
Peter Collingbourne [Mon, 21 Nov 2011 00:01:14 +0000 (00:01 +0000)]
Delete the depfile if we could not open a header file.  We cannot
generate any reasonable depfile if a header is missing.

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

12 years agoTeach the driver about failure result files, which are compilation
Peter Collingbourne [Mon, 21 Nov 2011 00:01:05 +0000 (00:01 +0000)]
Teach the driver about failure result files, which are compilation
output files that are valid regardless of whether the compilation
succeeded or failed (but not if we crash).  Add depfiles to the
failure result file list.

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

12 years agoCreate the clang++ symlink as a POST_BUILD custom command on clang.
Peter Collingbourne [Mon, 21 Nov 2011 00:00:48 +0000 (00:00 +0000)]
Create the clang++ symlink as a POST_BUILD custom command on clang.

This saves us from re-creating the symlink on every build even if we
didn't rebuild clang.

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

12 years agoCodeGen: allow __asm renaming on static local variables.
Benjamin Kramer [Sun, 20 Nov 2011 21:05:04 +0000 (21:05 +0000)]
CodeGen: allow __asm renaming on static local variables.

Fixes PR4777.

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

12 years agoAllow preprocessor callbacks to recover from a "file not found" error,
Douglas Gregor [Sun, 20 Nov 2011 17:46:46 +0000 (17:46 +0000)]
Allow preprocessor callbacks to recover from a "file not found" error,
from Jason Haslam!

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

12 years agoAdd support for pretty-printing attributes, from Richard Membarth!
Douglas Gregor [Sat, 19 Nov 2011 19:22:57 +0000 (19:22 +0000)]
Add support for pretty-printing attributes, from Richard Membarth!

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

12 years agoUpdate signature of HandleTopLevelDecl.
Douglas Gregor [Sat, 19 Nov 2011 19:22:13 +0000 (19:22 +0000)]
Update signature of HandleTopLevelDecl.

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

12 years agoTweak the guidelines for when one should send patches to cfe-commits vs. cfe-dev
Douglas Gregor [Sat, 19 Nov 2011 19:14:26 +0000 (19:14 +0000)]
Tweak the guidelines for when one should send patches to cfe-commits vs. cfe-dev

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

12 years agoFixed HadMultipleCandidates loading.
Abramo Bagnara [Sat, 19 Nov 2011 11:44:21 +0000 (11:44 +0000)]
Fixed HadMultipleCandidates loading.

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

12 years agoDriver: Remove the signal number from the "command failed" diagnostic.
Benjamin Kramer [Sat, 19 Nov 2011 10:24:49 +0000 (10:24 +0000)]
Driver: Remove the signal number from the "command failed" diagnostic.

- With the current implementation of sys::Program this always printed "2".
- The command execution code will output the right number anyway (including the signal name).

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

12 years agoInitialize ImplicitConversionSequence::ListInitializationSequence. Fixes PR11394
Douglas Gregor [Sat, 19 Nov 2011 09:56:57 +0000 (09:56 +0000)]
Initialize ImplicitConversionSequence::ListInitializationSequence. Fixes PR11394

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

12 years agoAdd missing initialization in the ContentCache. Seriously, when do
Douglas Gregor [Sat, 19 Nov 2011 09:42:42 +0000 (09:42 +0000)]
Add missing initialization in the ContentCache. Seriously, when do
constructors go below public member functions?

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

12 years agoEnable delayed template parsing for friend functions declared at template class scope.
Francois Pichet [Fri, 18 Nov 2011 23:47:17 +0000 (23:47 +0000)]
Enable delayed template parsing for friend functions declared at template class scope.

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

12 years agoFixed implicit instantiations source range.
Abramo Bagnara [Fri, 18 Nov 2011 08:08:52 +0000 (08:08 +0000)]
Fixed implicit instantiations source range.

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

12 years agoRefine placement of LangOptions object in CompilerInvocation by adding a new baseclas...
Ted Kremenek [Fri, 18 Nov 2011 04:32:13 +0000 (04:32 +0000)]
Refine placement of LangOptions object in CompilerInvocation by adding a new baseclass CompilerInvocationBase with a custom copy constructor.  This ensures that whenever the CompilerInvocation object's copy constructor is used we always clone the LangOptions object.

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

12 years agoFinish r144971, which was an incomplete commit.
Eli Friedman [Fri, 18 Nov 2011 04:01:36 +0000 (04:01 +0000)]
Finish r144971, which was an incomplete commit.

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

12 years agoFix the meaning of an "empty" record for the case of a zero-length array. Use isEmpt...
Eli Friedman [Fri, 18 Nov 2011 03:47:20 +0000 (03:47 +0000)]
Fix the meaning of an "empty" record for the case of a zero-length array.  Use isEmptyRecord for arguments on x86-32; there are structs of size 0 which don't count as empty.

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

12 years agoMake va_arg on x86-64 compute alignment the same way as argument passing.
Eli Friedman [Fri, 18 Nov 2011 02:44:19 +0000 (02:44 +0000)]
Make va_arg on x86-64 compute alignment the same way as argument passing.

Fixes <rdar://problem/10463281>.

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

12 years ago[analyzer] Warn when non pointer arguments are passed to scanf (only when running...
Anna Zaks [Fri, 18 Nov 2011 02:26:36 +0000 (02:26 +0000)]
[analyzer] Warn when non pointer arguments are passed to scanf (only when running taint checker).

There is an open radar to implement better scanf checking as a Sema warning. However, a bit of redundancy is fine in this case.

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

12 years agoA bunch of fixes to argument passing and va_arg on Darwin x86-32 for structures conta...
Eli Friedman [Fri, 18 Nov 2011 02:12:09 +0000 (02:12 +0000)]
A bunch of fixes to argument passing and va_arg on Darwin x86-32 for structures containing an SSE vector.

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

12 years agoDon't try to expand struct arguments containing holes on x86-32. From gcc struct...
Eli Friedman [Fri, 18 Nov 2011 01:32:26 +0000 (01:32 +0000)]
Don't try to expand struct arguments containing holes on x86-32.  From gcc struct layout tests.

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

12 years agoSimplify code for returning a struct for Darwin x86-32 ABI. Use a better type for...
Eli Friedman [Fri, 18 Nov 2011 01:25:50 +0000 (01:25 +0000)]
Simplify code for returning a struct for Darwin x86-32 ABI.  Use a better type for a function returning a struct containing only a pointer.  Handle the edge case of a struct containing only a float or double plus some dead padding instead of asserting.

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

12 years agoc-index-test.c: Fix syntax according to C.
NAKAMURA Takumi [Fri, 18 Nov 2011 00:51:03 +0000 (00:51 +0000)]
c-index-test.c: Fix syntax according to C.

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

12 years ago[analyzer] The compiler warning was disabling the analyzer in this test.
Anna Zaks [Fri, 18 Nov 2011 00:45:20 +0000 (00:45 +0000)]
[analyzer] The compiler warning was disabling the analyzer in this test.

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

12 years agoIgnore empty unions in argument lowering on x86-32. From gcc struct layout tests.
Eli Friedman [Fri, 18 Nov 2011 00:28:11 +0000 (00:28 +0000)]
Ignore empty unions in argument lowering on x86-32.  From gcc struct layout tests.

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

12 years agoChange ASTConsumer::HandleTopLevelDecl to return true for the parser to continue
Argyrios Kyrtzidis [Fri, 18 Nov 2011 00:26:59 +0000 (00:26 +0000)]
Change ASTConsumer::HandleTopLevelDecl to return true for the parser to continue
parsing or false to abort parsing.

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

12 years ago[libclang] Indexing API:
Argyrios Kyrtzidis [Fri, 18 Nov 2011 00:26:51 +0000 (00:26 +0000)]
[libclang] Indexing API:

-For indexDeclaration, also pass the declaration attributes as an array of cursors.
-Rename CXIndexOpt_OneRefPerFile -> CXIndexOpt_SuppressRedundantRefs, and only pass
  a reference if a declaration/definition does not exist in the file.
-Other fixes.

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

12 years ago[libclang] Indexing API: make sure we don't pass declarations/references without...
Argyrios Kyrtzidis [Fri, 18 Nov 2011 00:26:46 +0000 (00:26 +0000)]
[libclang] Indexing API: make sure we don't pass declarations/references without USR or location.

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

12 years agoUse the canonical decl to index so that we can really find it later.
Eric Christopher [Thu, 17 Nov 2011 23:45:00 +0000 (23:45 +0000)]
Use the canonical decl to index so that we can really find it later.

Fixes rdar://10433202

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

12 years agoAdded a clause to the ASTImporter allowing it to
Sean Callanan [Thu, 17 Nov 2011 23:20:56 +0000 (23:20 +0000)]
Added a clause to the ASTImporter allowing it to
import TranslationUnitDecls.

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

12 years ago[analyzer] Do not conjure a symbol when we need to propagate taint.
Anna Zaks [Thu, 17 Nov 2011 23:07:28 +0000 (23:07 +0000)]
[analyzer] Do not conjure a symbol when we need to propagate taint.

When the solver and SValBuilder cannot reason about symbolic expressions (ex: (x+1)*y ), the analyzer conjures a new symbol with no ties to the past. This helps it to recover some path-sensitivity. However, this breaks the taint propagation.

With this commit, we are going to construct the expression even if we cannot reason about it later on if an operand is tainted.

Also added some comments and asserts.

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

12 years agoMake 'LangOptions' in CompilerInvocation a heap-allocated, reference counted object...
Ted Kremenek [Thu, 17 Nov 2011 23:01:24 +0000 (23:01 +0000)]
Make 'LangOptions' in CompilerInvocation a heap-allocated, reference counted object.  I discovered that llvm::RefCountedBase<T> has
a bug where the reference count is copied in the copy constructor, which means that there were cases when the CompilerInvocation
objects created by ASTUnit were actually leaked.  When I fixed that bug locally, it showed that a whole bunch of code assumed
that the LangOptions object that was part of CompilerInvocation was still alive.  By making it heap-allocated and reference counted,
we can keep it around after the CompilerInvocation object goes away.

As part of this change, change CompilerInvocation:getLangOptions() to return a pointer, acting as another clue that this
object may outlive the CompilerInvocation object.

This commit doesn't fix the CompilerInvocation leak itself.  That will come when I commit the fix to llvm::RefCountedBase<T> to
mainline LLVM.

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

12 years agoSimplify crash cleanup logic in ASTUnit::LoadFromCommandLine() by zeroing out two...
Ted Kremenek [Thu, 17 Nov 2011 23:01:17 +0000 (23:01 +0000)]
Simplify crash cleanup logic in ASTUnit::LoadFromCommandLine() by zeroing out two IntrusiveRefCnt pointers after we have assigned their respective values into fields of ASTUnit.

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

12 years ago[analyzer] Minor tweaks to the ProgramState::isTainted().
Anna Zaks [Thu, 17 Nov 2011 22:59:00 +0000 (22:59 +0000)]
[analyzer] Minor tweaks to the ProgramState::isTainted().

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

12 years ago[analyzer] Add a helper method.
Anna Zaks [Thu, 17 Nov 2011 22:57:01 +0000 (22:57 +0000)]
[analyzer] Add a helper method.
Naming could be improved.. But we should first rename the classes in the SVal hierarchy.

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

12 years agoConstant expression evaluation: add support for evaluation of member pointers
Richard Smith [Thu, 17 Nov 2011 22:56:20 +0000 (22:56 +0000)]
Constant expression evaluation: add support for evaluation of member pointers
and base-to-derived casts, and add proper handling of temporaries.

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

12 years agoWhen making a suggestion regarding which module to load rather than
Douglas Gregor [Thu, 17 Nov 2011 22:44:56 +0000 (22:44 +0000)]
When making a suggestion regarding which module to load rather than
preprocess/parse a header, report back with an actual module (which
may be a submodule) rather than just the name of the module.

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

12 years agoAdd the notion of "framework" modules to module maps. Framework
Douglas Gregor [Thu, 17 Nov 2011 22:09:43 +0000 (22:09 +0000)]
Add the notion of "framework" modules to module maps. Framework
modules (obviously) describe frameworks, and understand the header
layout of frameworks.

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

12 years agoIf we're dealing with an overridden buffer in the AST reader, load the
Douglas Gregor [Thu, 17 Nov 2011 19:08:51 +0000 (19:08 +0000)]
If we're dealing with an overridden buffer in the AST reader, load the
file as a virtual file with the stored modification time and size.

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

12 years agodocs/UsersManual.html: Remove obsolete mingw issue.
NAKAMURA Takumi [Thu, 17 Nov 2011 07:54:13 +0000 (07:54 +0000)]
docs/UsersManual.html: Remove obsolete mingw issue.

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