]> granicus.if.org Git - clang/log
clang
14 years agoAdd an environment variable that makes libclang use chaining for PCH.
Sebastian Redl [Fri, 6 Aug 2010 00:35:11 +0000 (00:35 +0000)]
Add an environment variable that makes libclang use chaining for PCH.

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

14 years agoadd test case.
Zhongxing Xu [Fri, 6 Aug 2010 00:04:40 +0000 (00:04 +0000)]
add test case.

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

14 years agoWe don't want to support built-ins which aren't needed by the intrinsics. Remove...
Bruno Cardoso Lopes [Thu, 5 Aug 2010 23:47:43 +0000 (23:47 +0000)]
We don't want to support built-ins which aren't needed by the intrinsics. Remove them

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

14 years agoDon't assert on a file stream if its state is not tracked. Fix pr7831.
Zhongxing Xu [Thu, 5 Aug 2010 23:24:13 +0000 (23:24 +0000)]
Don't assert on a file stream if its state is not tracked. Fix pr7831.

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

14 years agoWhen checking if a buffer access is valid, first make sure the buffer has a valid...
Jordy Rose [Thu, 5 Aug 2010 23:11:30 +0000 (23:11 +0000)]
When checking if a buffer access is valid, first make sure the buffer has a valid Loc. Fixes PR7830.

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

14 years agoFix AVX 256-bit intrinsics headers by using the right cast type while dealing with...
Bruno Cardoso Lopes [Thu, 5 Aug 2010 23:04:58 +0000 (23:04 +0000)]
Fix AVX 256-bit intrinsics headers by using the right cast type while dealing with logical ops

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

14 years agoDon't crash when mangling empty anonymous unions. We never actually *need*
John McCall [Thu, 5 Aug 2010 22:02:13 +0000 (22:02 +0000)]
Don't crash when mangling empty anonymous unions.  We never actually *need*
these, but it's convenient to mangle them when deferring them (in the 99.99%
case where it's not an anonymous union, of course).

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

14 years agoCollect namespaces that need updating in a PCH chain. WIP
Sebastian Redl [Thu, 5 Aug 2010 21:22:19 +0000 (21:22 +0000)]
Collect namespaces that need updating in a PCH chain. WIP

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

14 years agoAdd support for block imported struct variable layout info.
Fariborz Jahanian [Thu, 5 Aug 2010 21:00:25 +0000 (21:00 +0000)]
Add support for block imported struct variable layout info.
(objc gc and blocks in NeXt runtime).

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

14 years agoIt turns out that linkers (at least, the Darwin linker) don't necessarily
John McCall [Thu, 5 Aug 2010 20:39:18 +0000 (20:39 +0000)]
It turns out that linkers (at least, the Darwin linker) don't necessarily
do the right thing with mixed-visibility symbols, so disable the visibility
optimization where that's possible, i.e. with template classes (since it's
possible that an arbitrary template might be subject to an explicit
instantiation elsewhere).  447.dealII actually does this.

I've put the code under an option that's currently not hooked up to anything.

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

14 years agofix the va_list definition for vc++64, patch by Cameron Esfahani!
Chris Lattner [Thu, 5 Aug 2010 20:04:20 +0000 (20:04 +0000)]
fix the va_list definition for vc++64, patch by Cameron Esfahani!

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

14 years agoWrite various C++-specific records to chained PCHs. Tests will come later.
Sebastian Redl [Thu, 5 Aug 2010 18:21:25 +0000 (18:21 +0000)]
Write various C++-specific records to chained PCHs. Tests will come later.

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

14 years agoArgument evaluation order is not guaranteed. Split these out to force an order.
John McCall [Thu, 5 Aug 2010 18:11:10 +0000 (18:11 +0000)]
Argument evaluation order is not guaranteed.  Split these out to force an order.

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

14 years agoFixed logic error in UnreachableCodeChecker's marking algorithm that would sometimes...
Tom Care [Thu, 5 Aug 2010 17:53:44 +0000 (17:53 +0000)]
Fixed logic error in UnreachableCodeChecker's marking algorithm that would sometimes allow for multiple sequential statements to be flagged.

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

14 years agoFix a major bug with -ftrapv and ++/--. Patch by David Keaton!
John McCall [Thu, 5 Aug 2010 17:39:44 +0000 (17:39 +0000)]
Fix a major bug with -ftrapv and ++/--.  Patch by David Keaton!

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

14 years agoAllow multiple __declspec attributes after a class-key.
John McCall [Thu, 5 Aug 2010 17:13:11 +0000 (17:13 +0000)]
Allow multiple __declspec attributes after a class-key.
Patch by Francois Pichet!

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

14 years agoFor now skip over aggregate non-byref block variables.
Fariborz Jahanian [Thu, 5 Aug 2010 16:13:18 +0000 (16:13 +0000)]
For now skip over aggregate non-byref block variables.
(objc gc specific).

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

14 years agoTrying to unbreak buildbot.
Fariborz Jahanian [Thu, 5 Aug 2010 15:52:12 +0000 (15:52 +0000)]
Trying to unbreak buildbot.

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

14 years agoRevert r110317, and add a comment why the assertion is not an invariant.
Ted Kremenek [Thu, 5 Aug 2010 15:03:30 +0000 (15:03 +0000)]
Revert r110317, and add a comment why the assertion is not an invariant.

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

14 years agoFlip the switch to use OffsetOfExpr unconditionally; feel free to revert if
Eli Friedman [Thu, 5 Aug 2010 10:15:45 +0000 (10:15 +0000)]
Flip the switch to use OffsetOfExpr unconditionally; feel free to revert if
this breaks something.

I'll wait a few days before cleaning out UnaryOperator::OffsetOf.

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

14 years agoPR7769: Fix references to anonymous structs/unions in base classes in
Eli Friedman [Thu, 5 Aug 2010 10:11:36 +0000 (10:11 +0000)]
PR7769: Fix references to anonymous structs/unions in base classes in
offsetof expressions.

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

14 years agoAdd IRGen support for non-constant OffsetOfExpr.
Eli Friedman [Thu, 5 Aug 2010 09:58:49 +0000 (09:58 +0000)]
Add IRGen support for non-constant OffsetOfExpr.

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

14 years agoStore the pending implicit instantiations in the PCH and perform them at the end...
Argyrios Kyrtzidis [Thu, 5 Aug 2010 09:48:16 +0000 (09:48 +0000)]
Store the pending implicit instantiations in the PCH and perform them at the end of the translation unit that
included the PCH, as God intended.

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

14 years agoSupport #pragma weak for PCH.
Argyrios Kyrtzidis [Thu, 5 Aug 2010 09:48:08 +0000 (09:48 +0000)]
Support #pragma weak for PCH.

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

14 years agoMake sure C++ variable definitions are actually passed to the consumer when loaded...
Argyrios Kyrtzidis [Thu, 5 Aug 2010 09:47:59 +0000 (09:47 +0000)]
Make sure C++ variable definitions are actually passed to the consumer when loaded from PCH.

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

14 years agoMake checker recognize OffsetOfExpr as a form of __builtin_offsetof.
Eli Friedman [Thu, 5 Aug 2010 09:43:11 +0000 (09:43 +0000)]
Make checker recognize OffsetOfExpr as a form of __builtin_offsetof.

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

14 years agoGive clang_codeCompleteAt() an "options" parameter, and add a new
Douglas Gregor [Thu, 5 Aug 2010 09:09:23 +0000 (09:09 +0000)]
Give clang_codeCompleteAt() an "options" parameter, and add a new
flags enumeration + default-generating function that allows
code-completion to be customized via the libclang API.

Plus, turn on spell-checking when performing code completion.

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

14 years agoTDK_InconsistentQuals is really totally different from TDK_Inconsistent.
John McCall [Thu, 5 Aug 2010 09:05:08 +0000 (09:05 +0000)]
TDK_InconsistentQuals is really totally different from TDK_Inconsistent.
Rename it to TDK_Underqualified to avoid this sort of confusion and give it
its own diagnostic.

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

14 years agoTurn the predicate into an assertion. When could the unequal case happen?
Zhongxing Xu [Thu, 5 Aug 2010 07:38:23 +0000 (07:38 +0000)]
Turn the predicate into an assertion. When could the unequal case happen?

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

14 years agoTests for #pragma GCC visibility.
Eli Friedman [Thu, 5 Aug 2010 07:00:53 +0000 (07:00 +0000)]
Tests for #pragma GCC visibility.

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

14 years agoImplement #pragma GCC visibility.
Eli Friedman [Thu, 5 Aug 2010 06:57:20 +0000 (06:57 +0000)]
Implement #pragma GCC visibility.

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

14 years agoRemove the warning for variables declared in the if-expression being used in
Nick Lewycky [Thu, 5 Aug 2010 06:27:49 +0000 (06:27 +0000)]
Remove the warning for variables declared in the if-expression being used in
the else clause. The problem is that it's overly zealous and will respond to
uses in assignments, or after assignments. We should bring this back once we
can do it right. Fixes PR7100.

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

14 years agoPermit template argument deduction to add qualifiers within ObjC object
John McCall [Thu, 5 Aug 2010 05:30:45 +0000 (05:30 +0000)]
Permit template argument deduction to add qualifiers within ObjC object
pointers like it can with normal and member pointers.

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

14 years agooperator<< on a DiagnosticBuilder should *always* output exactly one thing.
John McCall [Thu, 5 Aug 2010 04:58:04 +0000 (04:58 +0000)]
operator<< on a DiagnosticBuilder should *always* output exactly one thing.
Null template arguments are bad, but they're better than crashing with an
argument mismatch.

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

14 years agoTweak GRState::unbindLoc to use makeWithStore, and make sure it's only called for...
Jordy Rose [Thu, 5 Aug 2010 03:33:56 +0000 (03:33 +0000)]
Tweak GRState::unbindLoc to use makeWithStore, and make sure it's only called for non-region locations.

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

14 years agoRemove InvalidateRegion from stores, since it's no longer called from outside.
Jordy Rose [Thu, 5 Aug 2010 03:28:45 +0000 (03:28 +0000)]
Remove InvalidateRegion from stores, since it's no longer called from outside.

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

14 years agoConvert this file to not have Windows line endings -- likely committed from
Chandler Carruth [Thu, 5 Aug 2010 03:16:33 +0000 (03:16 +0000)]
Convert this file to not have Windows line endings -- likely committed from
Windows without svn:eol-style=native.

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

14 years agoAdd support for -Woverlength-strings.
Eli Friedman [Thu, 5 Aug 2010 02:57:44 +0000 (02:57 +0000)]
Add support for -Woverlength-strings.

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

14 years agoPreserve calling convention etc. across template instantiations.
Eli Friedman [Thu, 5 Aug 2010 02:54:05 +0000 (02:54 +0000)]
Preserve calling convention etc. across template instantiations.

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

14 years agoGet rid of isObjectType; when C++ says "object type", it generally
Eli Friedman [Thu, 5 Aug 2010 02:49:48 +0000 (02:49 +0000)]
Get rid of isObjectType; when C++ says "object type", it generally
just means "not a function type", not "not a function type or void". This
changes behavior slightly, but generally in a way which accepts more code.

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

14 years agoDrop an unjustified limitation from Type::isObjectType(). Fixes PR7801 and doesn...
Sebastian Redl [Thu, 5 Aug 2010 01:21:19 +0000 (01:21 +0000)]
Drop an unjustified limitation from Type::isObjectType(). Fixes PR7801 and doesn't seem to break anything.

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

14 years agoRemove a redundant and broken check. Fixes PR7810.
Sebastian Redl [Thu, 5 Aug 2010 00:45:34 +0000 (00:45 +0000)]
Remove a redundant and broken check. Fixes PR7810.

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

14 years agoClean up of my last patch.
Fariborz Jahanian [Thu, 5 Aug 2010 00:19:48 +0000 (00:19 +0000)]
Clean up of my last patch.

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

14 years agoCorrectly handle 'Class<...>' when examining Cocoa conventions in the static analyzer...
Ted Kremenek [Thu, 5 Aug 2010 00:19:24 +0000 (00:19 +0000)]
Correctly handle 'Class<...>' when examining Cocoa conventions in the static analyzer.  Fixes a crash reported in <rdar://problem/8272168>.  Patch by Henry Mason!

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

14 years agoRemove bonehead redeclaration.
Ted Kremenek [Thu, 5 Aug 2010 00:03:46 +0000 (00:03 +0000)]
Remove bonehead redeclaration.

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

14 years agoBlock variable layout bitmap API generation.
Fariborz Jahanian [Wed, 4 Aug 2010 23:55:24 +0000 (23:55 +0000)]
Block variable layout bitmap API generation.

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

14 years agoFix CFGBuilder to not blow out the stack when processing deeply nested CaseStmts...
Ted Kremenek [Wed, 4 Aug 2010 23:54:30 +0000 (23:54 +0000)]
Fix CFGBuilder to not blow out the stack when processing deeply nested CaseStmts.  Fixes <rdar://problem/8268753>.

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

14 years agoExtend the visibility-hidden optimization to linkonce_odr thunks for
John McCall [Wed, 4 Aug 2010 23:46:35 +0000 (23:46 +0000)]
Extend the visibility-hidden optimization to linkonce_odr thunks for
functions with in-line definitions, since such thunks will be emitted at any
use of the function.

Completes the feature work for rdar://problem/7523229.

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

14 years agoLogical AVX instrinsics can be matched directly, no need to use builtins here.
Bruno Cardoso Lopes [Wed, 4 Aug 2010 22:56:42 +0000 (22:56 +0000)]
Logical AVX instrinsics can be matched directly, no need to use builtins here.

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

14 years agoAdd -mavx and -mno-avx command line support
Bruno Cardoso Lopes [Wed, 4 Aug 2010 22:29:13 +0000 (22:29 +0000)]
Add -mavx and -mno-avx command line support

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

14 years agoActivate selectors in chained PCH. Chained PCH now works for Objective-C.
Sebastian Redl [Wed, 4 Aug 2010 22:21:29 +0000 (22:21 +0000)]
Activate selectors in chained PCH. Chained PCH now works for Objective-C.

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

14 years agoAdd AVX intrinsics header
Bruno Cardoso Lopes [Wed, 4 Aug 2010 22:03:36 +0000 (22:03 +0000)]
Add AVX intrinsics header

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

14 years agoBring stats for the method pool back.
Sebastian Redl [Wed, 4 Aug 2010 21:22:45 +0000 (21:22 +0000)]
Bring stats for the method pool back.

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

14 years agoImplement per-file reading of the selector table. This disables statistics about...
Sebastian Redl [Wed, 4 Aug 2010 20:40:17 +0000 (20:40 +0000)]
Implement per-file reading of the selector table. This disables statistics about method pool hits for the moment.

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

14 years agoTeach SemaChecking::CheckReturnStackAddr about ImplicitCastExprs that convert values...
Ted Kremenek [Wed, 4 Aug 2010 20:01:07 +0000 (20:01 +0000)]
Teach SemaChecking::CheckReturnStackAddr about ImplicitCastExprs that convert values to an lvalue.  This allows us to warn (again) about returning references to stack variables.  (fixes PR 7812).

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

14 years agoMore objc block variable layout info. work.
Fariborz Jahanian [Wed, 4 Aug 2010 18:44:59 +0000 (18:44 +0000)]
More objc block variable layout info. work.

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

14 years agoAdd CFGStmtMap, which defines a mapping from Stmt* to CFGBlock*. The immediate inten...
Ted Kremenek [Wed, 4 Aug 2010 18:23:15 +0000 (18:23 +0000)]
Add CFGStmtMap, which defines a mapping from Stmt* to CFGBlock*.  The immediate intended use is in the unreachable code analysis.

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

14 years agoWhen chaining, only write interesting selectors to the PCH.
Sebastian Redl [Wed, 4 Aug 2010 18:21:41 +0000 (18:21 +0000)]
When chaining, only write interesting selectors to the PCH.

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

14 years agoStore the IDs of selectors in the PCH file explicitly.
Sebastian Redl [Wed, 4 Aug 2010 17:20:04 +0000 (17:20 +0000)]
Store the IDs of selectors in the PCH file explicitly.

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

14 years agoWhen performing in-process code completion, don't free the remapped
Douglas Gregor [Wed, 4 Aug 2010 17:07:00 +0000 (17:07 +0000)]
When performing in-process code completion, don't free the remapped
file buffers until the code completion results are destroyed;
diagnostics may end up referring into the source.

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

14 years agoSome early work for providing block layout info.
Fariborz Jahanian [Wed, 4 Aug 2010 16:57:49 +0000 (16:57 +0000)]
Some early work for providing block layout info.
for objective-c/c++ blocks (NeXt runtime).

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

14 years agoAdd code-completion support directly to ASTUnit, which performs code
Douglas Gregor [Wed, 4 Aug 2010 16:47:14 +0000 (16:47 +0000)]
Add code-completion support directly to ASTUnit, which performs code
completion within the translation unit using the same command-line
arguments for parsing the translation unit. Eventually, we'll reuse
the precompiled preamble to improve code-completion performance, and
this also gives us a place to cache results.

Expose this function via the new libclang function
clang_codeCompleteAt(), which performs the code completion within a
CXTranslationUnit. The completion occurs in-process
(clang_codeCompletion() runs code completion out-of-process).

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

14 years agoEmit standard-library RTTI with external linkage, not weak_odr.
John McCall [Wed, 4 Aug 2010 08:34:44 +0000 (08:34 +0000)]
Emit standard-library RTTI with external linkage, not weak_odr.

Apply hidden visibility to most RTTI;  libstdc++ does not rely on exact
pointer equality for the type info (just the type info names).  Apply
the same optimization to RTTI that we do to vtables.

Fixes PR5962.

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

14 years agoChange the checker callback cache in GRExprEngine to be more compact (and IMHO a...
Jordy Rose [Wed, 4 Aug 2010 07:10:57 +0000 (07:10 +0000)]
Change the checker callback cache in GRExprEngine to be more compact (and IMHO a little easier to understand), and add the same sort of caching for EvalAssume (tied for least-used callback), mostly as proof-of-concept.

Before we go further with these, we should figure out a way to reuse the visit-and-cache code in CheckerVisit.

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

14 years agoAccept and ignore (for now) -funroll-loops.
Eric Christopher [Wed, 4 Aug 2010 06:55:48 +0000 (06:55 +0000)]
Accept and ignore (for now) -funroll-loops.

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

14 years agoExtend the hidden-visibility vtables optimization to template classes that
John McCall [Wed, 4 Aug 2010 06:38:15 +0000 (06:38 +0000)]
Extend the hidden-visibility vtables optimization to template classes that
haven't been explicitly instantiated.

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

14 years agoSome more correctness fixes and code-size optimizations for fragile-ABI
John McCall [Wed, 4 Aug 2010 05:59:32 +0000 (05:59 +0000)]
Some more correctness fixes and code-size optimizations for fragile-ABI
ObjC exceptions:
  - don't enter a try for the catch blocks unless there's a finally
  - put the setjmp buffer in the locals set for liveness reasons
  - dump the sync object into an alloca in the locals set for liveness reasons
Some of this can go away if the backend starts to properly calculate liveness
in the presence of setjmp (which would also be a *much* stabler solution).

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

14 years agoWhen we try (but fail) to build a precompiled preamble, wait for a
Douglas Gregor [Wed, 4 Aug 2010 05:53:38 +0000 (05:53 +0000)]
When we try (but fail) to build a precompiled preamble, wait for a
short "cooling off" period (defaulting to 5 reparses) before trying to
build a precompiled preamble again. Previously, if we failed to build
the precompiled preamble at any time, we just gave up the whole
charade any never tried again.

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

14 years agoAdd more AVX 256-bit intrinsics and test cases for them
Bruno Cardoso Lopes [Wed, 4 Aug 2010 01:11:26 +0000 (01:11 +0000)]
Add more AVX 256-bit intrinsics and test cases for them

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

14 years agoAdd a test case for P%7346, which was fixed by not doing the operator
John McCall [Wed, 4 Aug 2010 01:07:02 +0000 (01:07 +0000)]
Add a test case for P%7346, which was fixed by not doing the operator
delete lookup until the end of the class definition.

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

14 years agoOnly look up an 'operator delete' on the definition of a destructor, not on
John McCall [Wed, 4 Aug 2010 01:04:25 +0000 (01:04 +0000)]
Only look up an 'operator delete' on the definition of a destructor, not on
a declaration.

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

14 years agoLook through using declarations when deciding whether to use an operator
John McCall [Wed, 4 Aug 2010 00:31:26 +0000 (00:31 +0000)]
Look through using declarations when deciding whether to use an operator
delete for a virtual destructor.  Diagnose ambiguities.

Fixes PR7803.

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

14 years agoFix a warning on a test.
John McCall [Tue, 3 Aug 2010 22:49:45 +0000 (22:49 +0000)]
Fix a warning on a test.

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

14 years agoDo a very simple pass over every function we emit to infer whether we can
John McCall [Tue, 3 Aug 2010 22:46:07 +0000 (22:46 +0000)]
Do a very simple pass over every function we emit to infer whether we can
mark it nounwind based on whether it contains any non-nounwind calls.
<rdar://problem/8087431>

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

14 years agoadd a hack for visual studio, fixing PR7796
Chris Lattner [Tue, 3 Aug 2010 22:13:56 +0000 (22:13 +0000)]
add a hack for visual studio, fixing PR7796

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

14 years agoIncomplete promotion of selector info to per-file data.
Sebastian Redl [Tue, 3 Aug 2010 21:58:15 +0000 (21:58 +0000)]
Incomplete promotion of selector info to per-file data.
Store all selectors in the selector hash table instead of only those from the method pool.

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

14 years agoAdd support for VFP status & control operations for ARM.
Nate Begeman [Tue, 3 Aug 2010 21:32:34 +0000 (21:32 +0000)]
Add support for VFP status & control operations for ARM.

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

14 years agoImproved false positive detection and numerous small issues in UnreachableCodeChecker
Tom Care [Tue, 3 Aug 2010 21:24:13 +0000 (21:24 +0000)]
Improved false positive detection and numerous small issues in UnreachableCodeChecker
- Reporting now uses getUnreachableStmt which returns the Stmt* we should report
- Indexing of reachable and visited blocks now use CFGBlock ID's instead of pointers
- The CFG used in the unreachable search is now the unoptimized CFG
- Added 'Dead code' category to warnings
- Removed obsolete function getCondition
- Simplified false positive detection based on properties of FindUnreachableEntryPoints

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

14 years agoRemove DoneEvaluating field (unused since r90296)
Jordy Rose [Tue, 3 Aug 2010 20:45:31 +0000 (20:45 +0000)]
Remove DoneEvaluating field (unused since r90296)

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

14 years agoMakes GRState::makeWithStore private, to encourage clients to make store changes...
Jordy Rose [Tue, 3 Aug 2010 20:44:35 +0000 (20:44 +0000)]
Makes GRState::makeWithStore private, to encourage clients to make store changes through GRState instead of directly accessing the StoreManager. Also adds cover methods for InvalidateRegion(s) and EnterStackFrame to GRState.

This is in preparation for proposed region change notifications. No functionality change.

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

14 years agoWhen using a precompiled preamble, keep track of the top-level
Douglas Gregor [Tue, 3 Aug 2010 19:06:41 +0000 (19:06 +0000)]
When using a precompiled preamble, keep track of the top-level
declarations that we saw when creating the precompiled preamble, and
provide those declarations in addition to the declarations parsed in
the main source file when traversing top-level declarations. This
makes the use of precompiled preambles a pure optimization, rather
than changing the semantics of the parsed translation unit.

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

14 years agoPR7795: Fix the definition of __WCHAR_MAX__ with -fshort-wchar.
Eli Friedman [Tue, 3 Aug 2010 17:34:19 +0000 (17:34 +0000)]
PR7795: Fix the definition of __WCHAR_MAX__ with -fshort-wchar.

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

14 years agoApart from storing/retrieving the previous redeclaration from PCH, also store/retriev...
Argyrios Kyrtzidis [Tue, 3 Aug 2010 17:30:10 +0000 (17:30 +0000)]
Apart from storing/retrieving the previous redeclaration from PCH, also store/retrieve the most recent
redeclaration. That way we are sure that the full redeclarations chain is loaded.

When using chained PCHs, first declarations point to the most recent redeclarations in the same PCH.
To address this use a REDECLS_UPDATE_LATEST record block to keep track of which first declarations need
to point to a most recent redeclaration in another PCH.

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

14 years agoIntroduce getMostRecentDeclaration() and getFirstDeclaration() for RedeclarableTempla...
Argyrios Kyrtzidis [Tue, 3 Aug 2010 17:30:01 +0000 (17:30 +0000)]
Introduce getMostRecentDeclaration() and getFirstDeclaration() for RedeclarableTemplateDecl.

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

14 years agoSend AST dumping/printing to stdout instead of stderr.
Argyrios Kyrtzidis [Tue, 3 Aug 2010 17:29:57 +0000 (17:29 +0000)]
Send AST dumping/printing to stdout instead of stderr.

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

14 years agoAvoid writing a VTABLE_USES record in PCH if there are no entries.
Argyrios Kyrtzidis [Tue, 3 Aug 2010 17:29:52 +0000 (17:29 +0000)]
Avoid writing a VTABLE_USES record in PCH if there are no entries.

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

14 years agofix some undefined behavior, PR7779.
Chris Lattner [Tue, 3 Aug 2010 16:48:42 +0000 (16:48 +0000)]
fix some undefined behavior, PR7779.

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

14 years agoDriver: Don't forward any -g options to GCC, when using it to drive the
Daniel Dunbar [Tue, 3 Aug 2010 16:14:14 +0000 (16:14 +0000)]
Driver: Don't forward any -g options to GCC, when using it to drive the
assembler.
 - Fixes PR6218, hopefully.

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

14 years agoReshuffle the PCH generator action and consumer, so that we can re-use
Douglas Gregor [Tue, 3 Aug 2010 08:14:03 +0000 (08:14 +0000)]
Reshuffle the PCH generator action and consumer, so that we can re-use
it while generating precompiled preambles. No functionality change.

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

14 years agoEmit weak vtables of non-template classes with hidden visibility.
John McCall [Tue, 3 Aug 2010 07:24:12 +0000 (07:24 +0000)]
Emit weak vtables of non-template classes with hidden visibility.

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

14 years agoAllow offsets to be negative. Out-of-bound cases are checked elsewhere. We
Zhongxing Xu [Tue, 3 Aug 2010 06:34:25 +0000 (06:34 +0000)]
Allow offsets to be negative. Out-of-bound cases are checked elsewhere. We
shouldn't put restrictions in store manager.

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

14 years agoPull the region offset computation logic into a single method.
Zhongxing Xu [Tue, 3 Aug 2010 04:52:05 +0000 (04:52 +0000)]
Pull the region offset computation logic into a single method.

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

14 years agoSupport x86 AVX 256-bit instructions built-ins. Right now support all of them, but
Bruno Cardoso Lopes [Tue, 3 Aug 2010 01:57:18 +0000 (01:57 +0000)]
Support x86 AVX 256-bit instructions built-ins. Right now support all of them, but
as soon as we properly codegen the simple vector operations, remove the
unnecessary built-ins/intrinsics from clang and llvm. Also add tests for the new
built-ins

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

14 years agoChanged GRExprEngine to pass down a reference to itself when checkers are doing posta...
Tom Care [Tue, 3 Aug 2010 01:55:07 +0000 (01:55 +0000)]
Changed GRExprEngine to pass down a reference to itself when checkers are doing postanalysis. This allows the checker to gather information about the state of the engine when it has finished.
- Exposed the worklist and BlockAborted flag in GRCoreEngine
- Changed postanalysis checkers to use the new infrastructure

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

14 years agoAdd -cc1 option '-unoptimized-cfg' to toggle using a CFG (for static analysis) that...
Ted Kremenek [Tue, 3 Aug 2010 00:09:51 +0000 (00:09 +0000)]
Add -cc1 option '-unoptimized-cfg' to toggle using a CFG (for static analysis) that doesn't prune CFG edges.

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

14 years agoAdd 'AnalysisContext::getUnoptimizedCFG()' to allow clients to get access to the...
Ted Kremenek [Mon, 2 Aug 2010 23:46:59 +0000 (23:46 +0000)]
Add 'AnalysisContext::getUnoptimizedCFG()' to allow clients to get access to the original
CFG without any edges pruned out because of trivially solvable conditions (e.g., 'if (0)').

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

14 years agoLabels (and case statement) don't create independent scope parents for the
John McCall [Mon, 2 Aug 2010 23:33:14 +0000 (23:33 +0000)]
Labels (and case statement) don't create independent scope parents for the
purposes of the jump checker.  Also extend Ted's iteration fix to labels.

Fixes PR7789.

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

14 years agoSimplify global method pool implementation in Sema. No functionality change.
Sebastian Redl [Mon, 2 Aug 2010 23:18:59 +0000 (23:18 +0000)]
Simplify global method pool implementation in Sema. No functionality change.

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

14 years agoFix another case (this time in JumpScopeChecker) where walking deeply nested CaseStmt...
Ted Kremenek [Mon, 2 Aug 2010 22:46:57 +0000 (22:46 +0000)]
Fix another case (this time in JumpScopeChecker) where walking deeply nested CaseStmts can blow out the stack.  Fixes <rdar://problem/8125165>.

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

14 years agoFix idempotent operations false positive caused by ivars not being invalidated in...
Ted Kremenek [Mon, 2 Aug 2010 21:59:12 +0000 (21:59 +0000)]
Fix idempotent operations false positive caused by ivars not being invalidated in function
calls when the enclosing object had retain/release state.  Fixes <rdar://problem/8261992>.

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