]> granicus.if.org Git - clang/log
clang
12 years agoInclude the diagnostic introduced in r163078 in a group.
Joao Matos [Sun, 2 Sep 2012 00:48:08 +0000 (00:48 +0000)]
Include the diagnostic introduced in r163078 in a group.

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

12 years agoAdded a diagnostic for mismatched MS inheritance attributes. Also fixed the incomplet...
Joao Matos [Sun, 2 Sep 2012 00:13:48 +0000 (00:13 +0000)]
Added a diagnostic for mismatched MS inheritance attributes. Also fixed the incomplete type member pointer size calculation under the MS ABI.

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

12 years agoFixed typo causing tests to fail on non-MSVC machines.
Joao Matos [Sat, 1 Sep 2012 23:24:10 +0000 (23:24 +0000)]
Fixed typo causing tests to fail on non-MSVC machines.

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

12 years agoRefactored the Windows headers location lookup code. Expose it so standalone tools...
Joao Matos [Sat, 1 Sep 2012 22:33:43 +0000 (22:33 +0000)]
Refactored the Windows headers location lookup code. Expose it so standalone tools can have access to it.

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

12 years ago[analyzer] Silence unused variable warnings in NDEBUG builds.
Jordan Rose [Sat, 1 Sep 2012 19:15:13 +0000 (19:15 +0000)]
[analyzer] Silence unused variable warnings in NDEBUG builds.

No functionality change.

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

12 years ago[libclang] Fix indexing type alias declarations. rdar://11878406
Argyrios Kyrtzidis [Sat, 1 Sep 2012 19:08:08 +0000 (19:08 +0000)]
[libclang] Fix indexing type alias declarations. rdar://11878406

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

12 years ago[libclang] The annotation of tokens operation visits statement nodes code-recursively.
Argyrios Kyrtzidis [Sat, 1 Sep 2012 18:27:30 +0000 (18:27 +0000)]
[libclang] The annotation of tokens operation visits statement nodes code-recursively.
This can blow the stack with extremely deep hierarchies. Switch it to data-recursive.

This is implemented by introducing a post-children visitation callback that the
CursorVisitor is calling after child nodes of a cursor have been visited.
This is used by the annotate-tokens visitor to do extra work at that point.

rdar://11979525.

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

12 years ago[analyzer] Disallow creation of int vals with explicit bit width / signedness.
Jordan Rose [Sat, 1 Sep 2012 17:39:24 +0000 (17:39 +0000)]
[analyzer] Disallow creation of int vals with explicit bit width / signedness.

All clients of BasicValueFactory should be using QualTypes instead, and
indeed it seems they are. This caught the (fortunately harmless) bug
fixed in the previous commit.

No intended functionality change.

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

12 years ago[analyzer] Don't attempt to create a floating-point value of "1" for ++/--.
Jordan Rose [Sat, 1 Sep 2012 17:39:17 +0000 (17:39 +0000)]
[analyzer] Don't attempt to create a floating-point value of "1" for ++/--.

The current logic would actually create a float- or double-sized signed
integer value of 1, which is not at all the same.

No test because the value would be swallowed by an Unknown as soon as it
gets added or subtracted to the original value, but it enables the cleanup
in the next patch.

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

12 years ago[analyzer] Future-proofing r163012 (nameless functions and RetainCountChecker)
Jordan Rose [Sat, 1 Sep 2012 17:39:13 +0000 (17:39 +0000)]
[analyzer] Future-proofing r163012 (nameless functions and RetainCountChecker)

Any future exceptions need to go INSIDE the test that checks if the
IdentifierInfo is non-null!

No functionality change. Thanks for the review, Ted.

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

12 years ago[analyzer] Treat all struct values as regions (even rvalues).
Jordan Rose [Sat, 1 Sep 2012 17:39:09 +0000 (17:39 +0000)]
[analyzer] Treat all struct values as regions (even rvalues).

This allows us to correctly symbolicate the fields of structs returned by
value, as well as get the proper 'this' value for when methods are called
on structs returned by value.

This does require a moderately ugly hack in the StoreManager: if we assign
a "struct value" to a struct region, that now appears as a Loc value being
bound to a region of struct type. We handle this by simply "dereferencing"
the struct value region, which should create a LazyCompoundVal.

This should fix recent crashes analyzing LLVM and on our internal buildbot.

<rdar://problem/12137950>

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

12 years ago[analyzer] Always derive a CallEvent's return type from its origin expr.
Jordan Rose [Sat, 1 Sep 2012 17:39:00 +0000 (17:39 +0000)]
[analyzer] Always derive a CallEvent's return type from its origin expr.

Previously, we preferred to get a result type by looking at the callee's
declared result type. This allowed us to handlereferences, which are
represented in the AST as lvalues of their pointee type. (That is, a call
to a function returning 'int &' has type 'int' and value kind 'lvalue'.)

However, this results in us preferring the original type of a function
over a casted type. This is a problem when a function  pointer is casted
to another type, because the conjured result value will have the wrong
type. AdjustedReturnValueChecker is supposed to handle this, but still
doesn't handle the case where there is no "original function" at all,
i.e. where the callee is unknown.

Now, we instead look at the call expression's value kind (lvalue, xvalue,
or prvalue), and adjust the expr's type accordingly. This will have no
effect when the function is inlined, and will conjure the value that will
actually be used when it is not.

This makes AdjustedReturnValueChecker /nearly/ unnecessary; unfortunately,
the cases where it would still be useful are where we need to cast the
result of an inlined function or a checker-evaluated function, and in these
cases we don't know what we're casting /from/ by the time we can do post-
call checks. In light of that, remove AdjustedReturnValueChecker, which
was already not checking quite a few calls.

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

12 years ago[cindex.py] Add helper to initialize libclang functions
Tobias Grosser [Sat, 1 Sep 2012 08:55:17 +0000 (08:55 +0000)]
[cindex.py] Add helper to initialize libclang functions

The helper allows us to define how the initialization of functions should
behave. We use this patch to provide an informative error message, in case a
function is not available:

"LibclangError: /home/grosser/Projekte/llvm/install/lib/libclang.so: undefined
symbol: clang_method_added_in_2020. Please ensure that your python bindings are
compatible with your libclang.so version."

This patch also ensures that no spelling mistakes slip into the library
initialization. At the moment, there are a couple of 'argtype' -> 'argtypes'
mispellings that have been overlooked.

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

12 years agoComment that clang.dll is unavailable on cygming yet.
Ted Kremenek [Sat, 1 Sep 2012 07:38:58 +0000 (07:38 +0000)]
Comment that clang.dll is unavailable on cygming yet.

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

12 years agoc-arcmt-test/Makefile: Restore some stuff. clang.dll is unavailable on cygming yet.
NAKAMURA Takumi [Sat, 1 Sep 2012 06:38:53 +0000 (06:38 +0000)]
c-arcmt-test/Makefile: Restore some stuff. clang.dll is unavailable on cygming yet.

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

12 years agoTweak link order to hopefully resolve a buildbot failure.
Ted Kremenek [Sat, 1 Sep 2012 06:20:25 +0000 (06:20 +0000)]
Tweak link order to hopefully resolve a buildbot failure.

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

12 years agoSplit library clangRewrite into clangRewriteCore and clangRewriteFrontend.
Ted Kremenek [Sat, 1 Sep 2012 05:09:24 +0000 (05:09 +0000)]
Split library clangRewrite into clangRewriteCore and clangRewriteFrontend.
This is similar to how we divide up the StaticAnalyzer libraries to separate
core functionality to what is clearly associated with Frontend actions.

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

12 years agoChanged the remaining dead asserts to llvm_unreachable.
Joao Matos [Sat, 1 Sep 2012 00:13:24 +0000 (00:13 +0000)]
Changed the remaining dead asserts to llvm_unreachable.

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

12 years agodon't warn about unused values when the unused value is a statement expression expand...
Chris Lattner [Fri, 31 Aug 2012 22:39:21 +0000 (22:39 +0000)]
don't warn about unused values when the unused value is a statement expression expanded from a macro.  This is of dubious utility in general, but is specifically a major issue for the linux kernel.  This resolves PR13747.

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

12 years agoNormalize line endings of r163013 (part 2).
Joao Matos [Fri, 31 Aug 2012 22:18:20 +0000 (22:18 +0000)]
Normalize line endings of r163013 (part 2).

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

12 years agoRemove windows line endings.
Benjamin Kramer [Fri, 31 Aug 2012 22:14:25 +0000 (22:14 +0000)]
Remove windows line endings.

While there fix a dead assert.

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

12 years agoThread-safety analysis: fix handling of LOCK_RETURNED attribute so that the
DeLesley Hutchins [Fri, 31 Aug 2012 22:09:53 +0000 (22:09 +0000)]
Thread-safety analysis: fix handling of LOCK_RETURNED attribute so that the
latest definition of a function is always used when computing lock expressions.

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

12 years agoUpdate a warning to point to the DiagGroup created in DiagnosticGroups.td
Richard Trieu [Fri, 31 Aug 2012 22:03:03 +0000 (22:03 +0000)]
Update a warning to point to the DiagGroup created in DiagnosticGroups.td
instead of referring to the flag name.

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

12 years agoThread-safety analysis: fix handling of string constants in mutex
DeLesley Hutchins [Fri, 31 Aug 2012 21:57:32 +0000 (21:57 +0000)]
Thread-safety analysis: fix handling of string constants in mutex
expressions, which should be ignored right now.

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

12 years agoFix the build (-Wswitch violation introduced by r163013).
David Blaikie [Fri, 31 Aug 2012 21:55:26 +0000 (21:55 +0000)]
Fix the build (-Wswitch violation introduced by r163013).

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

12 years agoNormalize line endings of r163013.
Joao Matos [Fri, 31 Aug 2012 21:41:22 +0000 (21:41 +0000)]
Normalize line endings of r163013.

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

12 years agoNormalize line endings of r163022.
Joao Matos [Fri, 31 Aug 2012 21:34:27 +0000 (21:34 +0000)]
Normalize line endings of r163022.

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

12 years agoEmulate MSVC's preprocessor macro argument separator behavior by not considering...
Joao Matos [Fri, 31 Aug 2012 21:10:54 +0000 (21:10 +0000)]
Emulate MSVC's preprocessor macro argument separator behavior by not considering commas from nested macro expansions as argument separators. Fixes parsing of VS 2012 headers.

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

12 years agoobjective-C ARC; detect and warn on retain cycle when
Fariborz Jahanian [Fri, 31 Aug 2012 20:04:47 +0000 (20:04 +0000)]
objective-C ARC; detect and warn on retain cycle when
property-dot syntax is used on an object whose
capture causes retain cycle. // rdar://11702054

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

12 years agoImproved MSVC __interface support by adding first class support for it, instead of...
Joao Matos [Fri, 31 Aug 2012 18:45:21 +0000 (18:45 +0000)]
Improved MSVC __interface support by adding first class support for it, instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins.

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

12 years ago[analyzer] RetainCountChecker: don't assume all functions have names.
Jordan Rose [Fri, 31 Aug 2012 18:19:18 +0000 (18:19 +0000)]
[analyzer] RetainCountChecker: don't assume all functions have names.

Fixes a hard-to-reach crash when calling a non-member overloaded operator
with arguments that may be callbacks.

Future-proofing: don't make the same assumption in MallocSizeofChecker.
Aside from possibly respecting attributes in the future, it might be
possible to call 'malloc' through a function pointer.

I audited all other uses of FunctionDecl::getIdentifier() in the analyzer;
they all now correctly test to see if the identifier is present before
using it.

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

12 years agoFixed invalid iterators. Since the iterator is invalidated after the erase() call...
Joao Matos [Fri, 31 Aug 2012 17:28:09 +0000 (17:28 +0000)]
Fixed invalid iterators. Since the iterator is invalidated after the erase() call, we need to replace it with the new one returned. This was triggering an assert under MSVC 2012 and making all the ARCMT/ tests fail.

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

12 years ago[analyzer] Though C++ inlining is enabled, don't inline ctors and dtors.
Jordan Rose [Fri, 31 Aug 2012 17:06:49 +0000 (17:06 +0000)]
[analyzer] Though C++ inlining is enabled, don't inline ctors and dtors.

More generally, this adds a new configuration option 'c++-inlining', which
controls which C++ member functions can be considered for inlining. This
uses the new -analyzer-config table, so the cc1 arguments will look like this:

... -analyzer-config c++-inlining=[none|methods|constructors|destructors]

Note that each mode implies that all the previous member function kinds
will be inlined as well; it doesn't make sense to inline destructors
without inlining constructors, for example.

The default mode is 'methods'.

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

12 years agoobjective-C: underline name of the missing method
Fariborz Jahanian [Fri, 31 Aug 2012 17:03:18 +0000 (17:03 +0000)]
objective-C: underline name of the missing method
in the diagnbostic. // rdar://11303469

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

12 years agoRemove the useless CommentOptions class.
Dmitri Gribenko [Fri, 31 Aug 2012 10:35:30 +0000 (10:35 +0000)]
Remove the useless CommentOptions class.

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

12 years agoUse LLVM_DELETED_FUNCTION instead of a comment.
Dmitri Gribenko [Fri, 31 Aug 2012 10:23:13 +0000 (10:23 +0000)]
Use LLVM_DELETED_FUNCTION instead of a comment.

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

12 years agoMake AnalyzerOptions a shared object between CompilerInvocation and
Ted Kremenek [Fri, 31 Aug 2012 04:36:05 +0000 (04:36 +0000)]
Make AnalyzerOptions a shared object between CompilerInvocation and
AnalysisManager, allowing the StringMap of configuration values to
be propagated.

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

12 years agoMove AnalyzerOptions.h into 'Core' StaticAnalyzer sub-library.
Ted Kremenek [Fri, 31 Aug 2012 04:35:58 +0000 (04:35 +0000)]
Move AnalyzerOptions.h into 'Core' StaticAnalyzer sub-library.

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

12 years agoDeclPrinter tests: simplify the code by using the new runToolOnCodeWithArgs
Dmitri Gribenko [Fri, 31 Aug 2012 03:23:26 +0000 (03:23 +0000)]
DeclPrinter tests: simplify the code by using the new runToolOnCodeWithArgs
function from Tooling.

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

12 years agoDocumentation: correct a typo introduced in r162971.
Dmitri Gribenko [Fri, 31 Aug 2012 03:19:55 +0000 (03:19 +0000)]
Documentation: correct a typo introduced in r162971.

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

12 years agoDeclPrinter tests: since now some platforms use C++11 by default, make it
Dmitri Gribenko [Fri, 31 Aug 2012 03:05:44 +0000 (03:05 +0000)]
DeclPrinter tests: since now some platforms use C++11 by default, make it
explicitly visible in test cases which language variant is used.

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

12 years agoDocumentation: add missing word "accepts".
Dmitri Gribenko [Fri, 31 Aug 2012 02:39:31 +0000 (02:39 +0000)]
Documentation: add missing word "accepts".

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

12 years agoMake a bunch of methods on Lexer private.
Eli Friedman [Fri, 31 Aug 2012 02:29:37 +0000 (02:29 +0000)]
Make a bunch of methods on Lexer private.

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

12 years agoComment HTML tag name machers: move from StringSwitch to an efficient
Dmitri Gribenko [Fri, 31 Aug 2012 02:21:44 +0000 (02:21 +0000)]
Comment HTML tag name machers: move from StringSwitch to an efficient
TableGen-generated string matcher.

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

12 years agoRevert "[analyzer] Disable diagnostic checking on the buildbot."
Jordan Rose [Fri, 31 Aug 2012 00:36:30 +0000 (00:36 +0000)]
Revert "[analyzer] Disable diagnostic checking on the buildbot."

This reverts commit befc0f648c83f65e1f3567f2058c7c18b4bc3ad8 now that
plist-html diagnostics are working again.

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

12 years ago[analyzer] Ensure that PathDiagnostics profile the same regardless of path.
Jordan Rose [Fri, 31 Aug 2012 00:36:26 +0000 (00:36 +0000)]
[analyzer] Ensure that PathDiagnostics profile the same regardless of path.

PathDiagnostics are actually profiled and uniqued independently of the
path on which the bug occurred. This is used to merge diagnostics that
refer to the same issue along different paths, as well as by the plist
diagnostics to reference files created by the HTML diagnostics.

However, there are two problems with the current implementation:

1) The bug description is included in the profile, but some
   PathDiagnosticConsumers prefer abbreviated descriptions and some
   prefer verbose descriptions. Fixed by including both descriptions in
   the PathDiagnostic objects and always using the verbose one in the profile.

2) The "minimal" path generation scheme provides extra information about
   which events came from macros that the "extensive" scheme does not.
   This resulted not only in different locations for the plist and HTML
   diagnostics, but also in diagnostics being uniqued in the plist output
   but not in the HTML output. Fixed by storing the "end path" location
   explicitly in the PathDiagnostic object, rather than trying to find the
   last piece of the path when the diagnostic is requested.

This should hopefully finish unsticking our internal buildbot.

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

12 years ago[analyzer] Fix a crash in plist-html generation introduced in r162939.
Jordan Rose [Fri, 31 Aug 2012 00:36:20 +0000 (00:36 +0000)]
[analyzer] Fix a crash in plist-html generation introduced in r162939.

Basically, do the correct thing to fix the XML generation error, rather
than making it even worse by unilaterally dereferencing a null pointer.

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

12 years agoChange the representation of builtin functions in the AST
Eli Friedman [Fri, 31 Aug 2012 00:14:07 +0000 (00:14 +0000)]
Change the representation of builtin functions in the AST
(__builtin_* etc.) so that it isn't possible to take their address.
Specifically, introduce a new type to represent a reference to a builtin
function, and a new cast kind to convert it to a function pointer in the
operand of a call.  Fixes PR13195.

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

12 years agoobjective-C ARC: under -Wexplicit-ownership-type diagnose those
Fariborz Jahanian [Thu, 30 Aug 2012 23:56:02 +0000 (23:56 +0000)]
objective-C ARC: under -Wexplicit-ownership-type diagnose those
method parameter types which are reference to an objective-C
pointer to object with no explicit ownership. // rdar://10907090

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

12 years ago[analyzer] Refactor the logic that determines if a functions should be
Anna Zaks [Thu, 30 Aug 2012 23:42:02 +0000 (23:42 +0000)]
[analyzer] Refactor the logic that determines if a functions should be
reanalyzed.

The policy on what to reanalyze should be in AnalysisConsumer with the
rest of visitation order logic.

There is no reason why ExprEngine needs to pass the Visited set to
CoreEngine, it can populate it itself.

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

12 years ago[analyzer] Remove cast inside dyn_cast.
Anna Zaks [Thu, 30 Aug 2012 22:55:32 +0000 (22:55 +0000)]
[analyzer] Remove cast inside dyn_cast.

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

12 years ago[analyzer] Make analyzer-ipa=dynamic-bifurcate the default.
Anna Zaks [Thu, 30 Aug 2012 22:42:59 +0000 (22:42 +0000)]
[analyzer] Make analyzer-ipa=dynamic-bifurcate the default.

There are two tests regressions that come from the fact that the Retain
Count checker does not cancel out inlining of ObjC methods.

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

12 years ago[analyzer] Fixup for r162935 as per Jordan's review.
Anna Zaks [Thu, 30 Aug 2012 22:42:41 +0000 (22:42 +0000)]
[analyzer] Fixup for r162935 as per Jordan's review.

Thanks for catching this!

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

12 years agoSwitch a couple getAs uses to castAs.
Eli Friedman [Thu, 30 Aug 2012 22:22:09 +0000 (22:22 +0000)]
Switch a couple getAs uses to castAs.

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

12 years agoThe presence of a user-*declared* constructor makes the default
Douglas Gregor [Thu, 30 Aug 2012 21:47:37 +0000 (21:47 +0000)]
The presence of a user-*declared* constructor makes the default
constructor not user provided (and, therefore, non-trivial). Fixes
<rdar://problem/11736429>.

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

12 years ago[analyzer] Disable diagnostic checking on the buildbot.
Anna Zaks [Thu, 30 Aug 2012 21:04:09 +0000 (21:04 +0000)]
[analyzer] Disable diagnostic checking on the buildbot.

Due to recent diagnostic changes, we may generate malformed diagnostics.

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

12 years ago[analyzer] Plist diagnostics: Fix a case where we fail to close an XML tag.
Jordan Rose [Thu, 30 Aug 2012 20:43:09 +0000 (20:43 +0000)]
[analyzer] Plist diagnostics: Fix a case where we fail to close an XML tag.

If the current path diagnostic does /not/ have files associated with it, we
were simply skipping on to the next diagnostic with 'continue'. But that
also skipped the close tag for the diagnostic's <dict> node.

Part of fixing our internal analyzer buildbot.

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

12 years agoAdd -Wduplicate-enum warning. Clang will emit this warning when an implicitly
Richard Trieu [Thu, 30 Aug 2012 20:32:24 +0000 (20:32 +0000)]
Add -Wduplicate-enum warning.  Clang will emit this warning when an implicitly
initiated enum constant has the same value as another enum constant.

For instance:
enum test { A, B, C = -1, D, E = 1 };
Clang will warn that:
 A and D both have value 0
 B and E both have value 1

A few exceptions are made to keep the noise down.  Enum constants which are
initialized to another enum constant, or an enum constant plus or minus 1 will
not trigger this warning.  Also, anonymous enums are not checked.

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

12 years agoExtend the "__is_pod" hack, which demotes various type trait keywords
Douglas Gregor [Thu, 30 Aug 2012 20:04:43 +0000 (20:04 +0000)]
Extend the "__is_pod" hack, which demotes various type trait keywords
(__is_pod, __is_signed, etc.) to normal identifiers if they are
encountered in certain places in the grammar where we know that prior
versions of libstdc++ or libc++ use them, to still allow the use of
these keywords as type traits. Fixes <rdar://problem/9836262> and PR10184.

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

12 years agoFixes a bug for binding memoized match results.
Manuel Klimek [Thu, 30 Aug 2012 19:41:06 +0000 (19:41 +0000)]
Fixes a bug for binding memoized match results.

Intorduces an abstraction for DynTypedNode which makes
is impossible to create in ways that introduced the bug;
also hides the implementation details of the template
magic away from the user and prepares the code for adding
QualType and TypeLoc bindings, as well as using DynTypedNode
instead of overloads for child and ancestor matching.

getNodeAs<T> was changed towards a non-pointer type, as
we'll want QualType and TypeLoc nodes to be returned
by value (the alternative would be to create new storage
which is prohibitively costly if we want to use it for
child / ancestor matching).

DynTypedNode is moved into a new header ASTTypeTraits.h,
as it is completely independent of the rest of the matcher
infrastructure - if the need comes up, we can move it to
a more common place.

The interface for users before the introduction of the
common storage change remains the same, minus the introduced
bug, for which a regression test was added.

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

12 years ago[analyzer] Do not propagate the [super init] could be nil assumption
Anna Zaks [Thu, 30 Aug 2012 19:40:52 +0000 (19:40 +0000)]
[analyzer] Do not propagate the [super init] could be nil assumption
from callee to caller.

radar://12109638

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

12 years agoTeach RetainCountChecker about 'pragma clang arc_cf_code_audited'.
Ted Kremenek [Thu, 30 Aug 2012 19:27:02 +0000 (19:27 +0000)]
Teach RetainCountChecker about 'pragma clang arc_cf_code_audited'.

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

12 years agoFix missing 'clang' in pragma example in ARC doc.
Ted Kremenek [Thu, 30 Aug 2012 19:26:58 +0000 (19:26 +0000)]
Fix missing 'clang' in pragma example in ARC doc.

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

12 years agoRename 'MaxLoop' to 'maxBlockVisitOnPath' to reflect reality. We
Ted Kremenek [Thu, 30 Aug 2012 19:26:56 +0000 (19:26 +0000)]
Rename 'MaxLoop' to 'maxBlockVisitOnPath' to reflect reality.  We
should consider renaming the command line option as well.

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

12 years agoRename 'VisualizeEGUbi' and 'VisualizeEGDot' to 'visualizeExplodedGraphWithUbigGraph'
Ted Kremenek [Thu, 30 Aug 2012 19:26:53 +0000 (19:26 +0000)]
Rename 'VisualizeEGUbi' and 'VisualizeEGDot' to 'visualizeExplodedGraphWithUbigGraph'
and 'visualizeExplodedGraphWithGraphViz' respectively.

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

12 years agoRename AnalyzerOptions 'EagerlyAssume' to 'eagerlyAssumeBinOpBifurcation'.
Ted Kremenek [Thu, 30 Aug 2012 19:26:48 +0000 (19:26 +0000)]
Rename AnalyzerOptions 'EagerlyAssume' to 'eagerlyAssumeBinOpBifurcation'.

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

12 years agoStore const& to AnalyzerOptions in AnalysisManager instead of copying
Ted Kremenek [Thu, 30 Aug 2012 19:26:43 +0000 (19:26 +0000)]
Store const& to AnalyzerOptions in AnalysisManager instead of copying
individual flags.

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

12 years agoMove AnalyzerOptions.h to include/clang/StaticAnalyzer.
Ted Kremenek [Thu, 30 Aug 2012 19:26:38 +0000 (19:26 +0000)]
Move AnalyzerOptions.h to include/clang/StaticAnalyzer.

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

12 years agoMove Analyses.def to include/clang/StaticAnalyzer.
Ted Kremenek [Thu, 30 Aug 2012 19:26:33 +0000 (19:26 +0000)]
Move Analyses.def to include/clang/StaticAnalyzer.

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

12 years agoobjective-C: clang must implicitly convert
Fariborz Jahanian [Thu, 30 Aug 2012 18:49:41 +0000 (18:49 +0000)]
objective-C: clang must implicitly convert
__objc_yes/__objc_no to (BOOL)1/(BOOL)0 when
BOOL is declared; otherwise it resorts to
default of 'signed char'. This is important to
selecting the correct Numeric API numberWithBool:
Can't have a clang test for this. Will checkin and
executable llvm test. // rdar://12156616

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

12 years agoMake preprocessor act in a GCC-compatible fashion when a macro is redefined
Richard Smith [Thu, 30 Aug 2012 13:38:46 +0000 (13:38 +0000)]
Make preprocessor act in a GCC-compatible fashion when a macro is redefined
within its own argument list. The original definition is used for the immediate
expansion, but the new definition is used for any subsequent occurences within
the argument list or after the expansion.

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

12 years agoPR13652: Don't assume the parameter array on a FunctionTypeLoc for a lambda will
Richard Smith [Thu, 30 Aug 2012 13:13:20 +0000 (13:13 +0000)]
PR13652: Don't assume the parameter array on a FunctionTypeLoc for a lambda will
be filled in; they won't if the lambda's declarator has an invalid type. Instead
take the parameters from the declarator directly.

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

12 years agoWWW: Force word wrapping of the content to avoid horizontal scrolling.
Benjamin Kramer [Thu, 30 Aug 2012 13:12:02 +0000 (13:12 +0000)]
WWW: Force word wrapping of the content to avoid horizontal scrolling.

This isn't perfect but avoids overlap of the menu and the content.

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

12 years agoChange -analyzer-config to use '=' as the key-value separator, and only
Ted Kremenek [Thu, 30 Aug 2012 05:49:16 +0000 (05:49 +0000)]
Change -analyzer-config to use '=' as the key-value separator, and only
support the '-analyzer-config key=val' variant.

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

12 years agoReland r160052: Default to -std=c++11 on Windows.
Nico Weber [Thu, 30 Aug 2012 02:08:31 +0000 (02:08 +0000)]
Reland r160052: Default to -std=c++11 on Windows.

Also update the tests that rely on c++98 to explicitly mention that.

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

12 years agoTooling: Add a runToolOnCodeWithArgs() function that allows
Nico Weber [Thu, 30 Aug 2012 02:02:19 +0000 (02:02 +0000)]
Tooling: Add a runToolOnCodeWithArgs() function that allows
passing additional parameters to a tool.

Use this to fix a FIXME in testing code.

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

12 years agoFix C++ comment in C source
Michael Liao [Thu, 30 Aug 2012 00:45:32 +0000 (00:45 +0000)]
Fix C++ comment in C source

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

12 years agoFix a crash in type merging with enum types.
Eli Friedman [Thu, 30 Aug 2012 00:44:15 +0000 (00:44 +0000)]
Fix a crash in type merging with enum types.

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

12 years agoEmit .gcda files as absolute paths instead of relative paths.
Bill Wendling [Thu, 30 Aug 2012 00:43:41 +0000 (00:43 +0000)]
Emit .gcda files as absolute paths instead of relative paths.

This improves compatibility with gcc in this regard, and this file generation
can be ameliorated with GCOV_PREFIX and GCOV_PREFIX_STRIP. It's also useful if
your build directory doesn't specify -o <abspath> and it uses a recursive make
structure, so it's not relative to the toplevel.

Patch by Joshua Cranmer!
<rdar://problem/12179524>

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

12 years agoMake this test portable.
Ted Kremenek [Thu, 30 Aug 2012 00:27:25 +0000 (00:27 +0000)]
Make this test portable.

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

12 years ago[analyzer] Stop tracking symbols based on a retain count summary of
Anna Zaks [Wed, 29 Aug 2012 23:23:43 +0000 (23:23 +0000)]
[analyzer] Stop tracking symbols based on a retain count summary of
inlined function.

This resolves retain count checker false positives that are caused by
inlining ObjC and other methods. Essentially, if we are passing an
object to a method with "delegate" in the selector or a function pointer
as another argument, we should stop tracking the other parameters/return
value as far as the retain count checker is concerned.

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

12 years ago[analyzer] Fixup 162863.
Anna Zaks [Wed, 29 Aug 2012 23:23:39 +0000 (23:23 +0000)]
[analyzer] Fixup 162863.

Thanks Jordan.

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

12 years agoFix serious regression introduced in r157780 where __attribute__((NSObject))
Ted Kremenek [Wed, 29 Aug 2012 22:54:47 +0000 (22:54 +0000)]
Fix serious regression introduced in r157780 where __attribute__((NSObject))
could not be attached to a CFTypeRef.

Fixes <rdar://problem/12197822>

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

12 years agoFix PR reference in test.
Eli Friedman [Wed, 29 Aug 2012 21:27:50 +0000 (21:27 +0000)]
Fix PR reference in test.

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

12 years agoFix run-line for test.
Eli Friedman [Wed, 29 Aug 2012 21:25:58 +0000 (21:25 +0000)]
Fix run-line for test.

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

12 years ago[analyzer]Fix typo, unbreak static analyzer BuildBot (at least
Anna Zaks [Wed, 29 Aug 2012 21:22:40 +0000 (21:22 +0000)]
[analyzer]Fix typo, unbreak static analyzer BuildBot (at least
partially).

(Addresses a regression from r162790.)

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

12 years ago[analyzer] Improved diagnostic pruning for calls initializing values.
Anna Zaks [Wed, 29 Aug 2012 21:22:37 +0000 (21:22 +0000)]
[analyzer] Improved diagnostic pruning for calls initializing values.

This heuristic addresses the case when a pointer (or ref) is passed
to a function, which initializes the variable (or sets it to something
other than '0'). On the branch where the inlined function does not
set the value, we report use of undefined value (or NULL pointer
dereference). The access happens in the caller and the path
through the callee would get pruned away with regular path pruning. To
solve this issue, we previously disabled diagnostic pruning completely
on undefined and null pointer dereference checks, which entailed very
verbose diagnostics in most cases. Furthermore, not all of the
undef value checks had the diagnostic pruning disabled.

This patch implements the following heuristic: if we pass a pointer (or
ref) to the region (on which the error is reported) into a function and
it's value is either undef or 'NULL' (and is a pointer), do not prune
the function.

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

12 years agoMake alignment computation for pointer values for builtins handle
Eli Friedman [Wed, 29 Aug 2012 21:21:11 +0000 (21:21 +0000)]
Make alignment computation for pointer values for builtins handle
non-pointer types with a pointer representation correctly. PR13660.

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

12 years agoDefine __mips64 / __mips64__ macros for MIPS 64-bit targets.
Simon Atanasyan [Wed, 29 Aug 2012 20:50:11 +0000 (20:50 +0000)]
Define __mips64 / __mips64__ macros for MIPS 64-bit targets.
The patch suggested by Brad Smith.

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

12 years agoUse getTargetDefines() virtual function in MipsTargetInfoBase successors
Simon Atanasyan [Wed, 29 Aug 2012 19:59:32 +0000 (19:59 +0000)]
Use getTargetDefines() virtual function in MipsTargetInfoBase successors
to define all macros for MIPS targets. Remove redundant virtual function
getArchDefines(). Two virtual functions for this task are really too much.

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

12 years agoFactor out MIPS macro definitions common for all MIPS targets.
Simon Atanasyan [Wed, 29 Aug 2012 19:14:58 +0000 (19:14 +0000)]
Factor out MIPS macro definitions common for all MIPS targets.

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

12 years agoMove TLS check from LValueExprEvaluator::VisitVarDecl to
Hans Wennborg [Wed, 29 Aug 2012 18:27:29 +0000 (18:27 +0000)]
Move TLS check from LValueExprEvaluator::VisitVarDecl to
CheckLValueConstantExpression.

Richard pointed out that using the address of a TLS variable is ok in a
core C++11 constant expression, as long as it isn't part of the eventual
result of constant expression evaluation. Having the check in
CheckLValueConstantExpression accomplishes this.

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

12 years agoobjective-C: make -Widiomatic-parentheses work
Fariborz Jahanian [Wed, 29 Aug 2012 17:17:11 +0000 (17:17 +0000)]
objective-C: make -Widiomatic-parentheses work
when assignment expression in conditional invloves
property reference. // rdar://11066598

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

12 years agoFixed a problem with #pragma push_macro/pop_macro implementation.
Alexander Kornienko [Wed, 29 Aug 2012 16:56:24 +0000 (16:56 +0000)]
Fixed a problem with #pragma push_macro/pop_macro implementation.

Summary:
The problem was with the following sequence:
  #pragma push_macro("long")
  #undef long
  #pragma pop_macro("long")
in case when "long" didn't represent a macro.
Fixed crash and removed code duplication for #undef/pop_macro case. Added regression tests.

Reviewers: doug.gregor, klimek

Reviewed By: doug.gregor

CC: cfe-commits, chapuni
Differential Revision: http://llvm-reviews.chandlerc.com/D31

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

12 years agoDefine _MIPS_ARCH and _MIPS_ARCH_<cpu name> macros for MIPS targets.
Simon Atanasyan [Wed, 29 Aug 2012 15:17:29 +0000 (15:17 +0000)]
Define _MIPS_ARCH and _MIPS_ARCH_<cpu name> macros for MIPS targets.
The patch suggested by Logan Chien.

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

12 years agoReversing the logic since C99 mode is actually not an extension. Also, changing...
Aaron Ballman [Wed, 29 Aug 2012 12:35:14 +0000 (12:35 +0000)]
Reversing the logic since C99 mode is actually not an extension.  Also, changing the group to the singular to match the diagnostic better.

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

12 years agoFix r162835 as per Richard's comments.
Hans Wennborg [Wed, 29 Aug 2012 09:17:34 +0000 (09:17 +0000)]
Fix r162835 as per Richard's comments.

VisitVarDecl should return Error(E), and we should test that the address
of a TLS var can't be used as a constexpr.

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

12 years agoMove the test for PR13720 from Sema/init.c to Sema/thread-specifier.c.
Hans Wennborg [Wed, 29 Aug 2012 09:04:10 +0000 (09:04 +0000)]
Move the test for PR13720 from Sema/init.c to Sema/thread-specifier.c.

Can't use __thread in init.c because it doesn't have a triple.

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

12 years agoThe address of a TLS var is not compile-time constant (PR13720)
Hans Wennborg [Wed, 29 Aug 2012 08:44:49 +0000 (08:44 +0000)]
The address of a TLS var is not compile-time constant (PR13720)

This makes Clang produce an error for code such as:

  __thread int x;
  int *p = &x;

The lvalue of a thread-local variable cannot be evaluated at compile
time.

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

12 years agoClarify the point at which ARC destroys ivars vis-à-vis
John McCall [Wed, 29 Aug 2012 08:32:30 +0000 (08:32 +0000)]
Clarify the point at which ARC destroys ivars vis-à-vis
[super dealloc].  rdar://problem/11141872

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