]> granicus.if.org Git - clang/log
clang
12 years agoRemoved an unused field and its accessors methods.
Erik Verbruggen [Mon, 19 Sep 2011 15:10:40 +0000 (15:10 +0000)]
Removed an unused field and its accessors methods.

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

12 years agoFirst test commit.
Erik Verbruggen [Mon, 19 Sep 2011 15:03:11 +0000 (15:03 +0000)]
First test commit.

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

12 years agoIn constructors, don't generate implicit initializers for members of anonymous struct...
Richard Smith [Mon, 19 Sep 2011 13:34:43 +0000 (13:34 +0000)]
In constructors, don't generate implicit initializers for members of anonymous structs contained within anonymous unions.

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

12 years agoRemove function which is unused as of r139996. Thanks to David Blaikie for bringing...
Richard Smith [Mon, 19 Sep 2011 11:19:27 +0000 (11:19 +0000)]
Remove function which is unused as of r139996. Thanks to David Blaikie for bringing this to my attention.

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

12 years agoDo not use builtin includes if -fms-compatibility is specified. Some MSVC header...
Francois Pichet [Mon, 19 Sep 2011 05:15:54 +0000 (05:15 +0000)]
Do not use builtin includes if -fms-compatibility is specified. Some MSVC header files have the same name as clang's builtins, this creates clash.

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

12 years agoMove the "jump bypasses variable initialization" error -> warning downgrade from...
Francois Pichet [Sun, 18 Sep 2011 21:48:27 +0000 (21:48 +0000)]
Move the "jump bypasses variable initialization" error -> warning downgrade from -fms-extensions to -fms-compatibility.

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

12 years agoIn Microsoft mode(-fms-compatibility), prefer an integral conversion to a floating...
Francois Pichet [Sun, 18 Sep 2011 21:37:37 +0000 (21:37 +0000)]
In Microsoft mode(-fms-compatibility), prefer an integral conversion to a floating-to-integral conversion if the integral conversion is between types of the same size.

For example:
 void f(float);
 void f(int);
 int main {
    long a;
    f(a);
 }
Here, MSVC will call f(int) instead of generating a compile error as clang will do in standard mode.
This fixes a few errors when parsing MFC code with clang.

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

12 years agoPR10304: Do not call destructors for data members from union destructors. Prior to...
Richard Smith [Sun, 18 Sep 2011 12:11:43 +0000 (12:11 +0000)]
PR10304: Do not call destructors for data members from union destructors. Prior to C++11, this
has no effect since any such destructors must be trivial, and in C++11 such destructors must not
be called.

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

12 years agoPR10954: variant members should not be implicitly initialized in constructors if no
Richard Smith [Sun, 18 Sep 2011 11:14:50 +0000 (11:14 +0000)]
PR10954: variant members should not be implicitly initialized in constructors if no
mem-initializer is specified for them, unless an in-class initializer is specified.

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

12 years agoFix PR10531. Attach an initializer to anonymous unions, since the default constructor...
Richard Smith [Sun, 18 Sep 2011 00:06:34 +0000 (00:06 +0000)]
Fix PR10531. Attach an initializer to anonymous unions, since the default constructor might not be trivial (if there is an in-class initializer for some member) and might be deleted.

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

12 years agoLet -Warray-bounds handle casted array types without false positives.
Nico Weber [Sat, 17 Sep 2011 22:59:41 +0000 (22:59 +0000)]
Let -Warray-bounds handle casted array types without false positives.

Fixes PR10771.

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

12 years agoobjc - Treat type of 'self' in class methods as root of
Fariborz Jahanian [Sat, 17 Sep 2011 19:23:40 +0000 (19:23 +0000)]
objc - Treat type of 'self' in class methods as root of
class of this method. // rdar://10109725

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

12 years agoobjc: Don't crash with decl context for property impl.
Fariborz Jahanian [Sat, 17 Sep 2011 18:48:50 +0000 (18:48 +0000)]
objc: Don't crash with decl context for property impl.
is missing. // rdar//10127639

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

12 years agoRename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear that...
Francois Pichet [Sat, 17 Sep 2011 17:15:52 +0000 (17:15 +0000)]
Rename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag.

Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag.

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

12 years agoWhen we load header file information from the external source (i.e.,
Douglas Gregor [Sat, 17 Sep 2011 05:35:18 +0000 (05:35 +0000)]
When we load header file information from the external source (i.e.,
the AST reader), merge that header file information with whatever
header file information we already have. Otherwise, we might forget
something we already knew (e.g., that the header was #import'd already).

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

12 years agoAs per discussion with Doug Gregor on the IRC channel, introduce a new compiler switc...
Francois Pichet [Sat, 17 Sep 2011 04:32:15 +0000 (04:32 +0000)]
As per discussion with Doug Gregor on the IRC channel, introduce a new compiler switch: -fms-compatility.

Microsoft specific tweaking will now fall into 2 categories:

    - fms-extension: Microsoft specific extensions that should never change the meaning of an otherwise well formed code. Currently map to LangOptions::Microsoft. (To be clearer, I am planning to change the name to LangOptions::MicrosoftExt).

    - fms-compatibility: Really a MSVC emulation mode. Map to LangOptions::MicrosoftMode. Can change the meaning of an otherwise standard conformant program.

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

12 years agoPass -fmodule-cache-path along to -cc1 properly
Douglas Gregor [Sat, 17 Sep 2011 02:20:28 +0000 (02:20 +0000)]
Pass -fmodule-cache-path along to -cc1 properly

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

12 years agoWith modules, we can end up loading a new module after we've seen an
Douglas Gregor [Sat, 17 Sep 2011 00:05:03 +0000 (00:05 +0000)]
With modules, we can end up loading a new module after we've seen an
arbitrary amount of code. This forces us to stage the AST writer more
strictly, ensuring that we don't assign a declaration ID to a
declaration until after we're certain that no more modules will get
loaded.

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

12 years agoIn Microsoft mode, warn if an indirect goto jump over a variable initialization.
Francois Pichet [Fri, 16 Sep 2011 23:15:32 +0000 (23:15 +0000)]
In Microsoft mode, warn if an indirect goto jump over a variable initialization.
Also add a test case for the non Microsoft case because such test didn't exist.

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

12 years agoFix massive LiveVariables regression (due to LiveVariables rewrite) by addressing...
Ted Kremenek [Fri, 16 Sep 2011 23:01:39 +0000 (23:01 +0000)]
Fix massive LiveVariables regression (due to LiveVariables rewrite) by addressing two performance problems:

- Speed of "merge()", which merged data flow facts.  This was doing a set canonicalization on every insertion, which was super slow.
  To fix this, we use ImmutableSetRef.

- Visit CFGBlocks in reverse postorder.  This is a huge speedup, as on some test cases the algorithm would take many iterations
  to converge.

This contains a bunch of copy-paste from UninitializedValues.cpp and ThreadSafety.cpp.  The idea
was to get something working first, and then refactor the common logic for all three files into
a separate analysis/library entry point.

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

12 years agoFix search paths for Ubuntu 11.04 x86. Patch by Stepan Dyatkovskiy.
Eli Friedman [Fri, 16 Sep 2011 21:04:38 +0000 (21:04 +0000)]
Fix search paths for Ubuntu 11.04 x86.  Patch by Stepan Dyatkovskiy.

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

12 years ago[analyzer] Refactor: make PathDiagnosticLocation responsible for validation of Source...
Anna Zaks [Fri, 16 Sep 2011 19:18:30 +0000 (19:18 +0000)]
[analyzer] Refactor: make PathDiagnosticLocation responsible for validation of SourceLocations (commit 5 of ?):
 - Get rid of PathDiagnosticLocation(SourceRange r,..) constructor by providing a bunch of create methods.
 - The PathDiagnosticLocation(SourceLocation L,..), which is used by crate methods, will eventually become private.
 - Test difference is in the case when the report starts at the beginning of the function. We used to represent that point as a range of the very first token in the first statement. Now, it's just a single location representing the first character of the first statement.

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

12 years agotest/CodeGen/sse-builtins.c: Make this host-independent to unbreak posix-unlike hosts.
NAKAMURA Takumi [Fri, 16 Sep 2011 03:55:36 +0000 (03:55 +0000)]
test/CodeGen/sse-builtins.c: Make this host-independent to unbreak posix-unlike hosts.

Without -ffreestanding, clang tries to seek /usr/include/stdlib.h in host filesystem, even on Windows hosts.

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

12 years agoMoves calls of checkArithmeticNull() from CreateBuiltinBinOp() into the individual...
Richard Trieu [Fri, 16 Sep 2011 00:53:10 +0000 (00:53 +0000)]
Moves calls of checkArithmeticNull() from CreateBuiltinBinOp() into the individual Check*Operands() functions.

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

12 years agoThread safety: Adding FIXMEs and a couple cleanups
Caitlin Sadowski [Fri, 16 Sep 2011 00:35:54 +0000 (00:35 +0000)]
Thread safety: Adding FIXMEs and a couple cleanups

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

12 years agoTweak the module auto-import heuristics a bit
Douglas Gregor [Fri, 16 Sep 2011 00:22:46 +0000 (00:22 +0000)]
Tweak the module auto-import heuristics a bit

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

12 years agoRemove no longer needed LHSType and RHSType from checkArithmeticNull()
Richard Trieu [Thu, 15 Sep 2011 23:57:21 +0000 (23:57 +0000)]
Remove no longer needed LHSType and RHSType from checkArithmeticNull()

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

12 years agoChange checkArithmeticNull() to use a NonNullType, instead of checking both the
Richard Trieu [Thu, 15 Sep 2011 23:51:29 +0000 (23:51 +0000)]
Change checkArithmeticNull() to use a NonNullType, instead of checking both the
LHSType and RHSType for everything.

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

12 years agoRemove standard library includes from test; they explode on Windows.
Eli Friedman [Thu, 15 Sep 2011 23:24:35 +0000 (23:24 +0000)]
Remove standard library includes from test; they explode on Windows.

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

12 years agoTweak *mmintrin.h so that they don't make any bad assumptions about alignment (which...
Eli Friedman [Thu, 15 Sep 2011 23:15:27 +0000 (23:15 +0000)]
Tweak *mmintrin.h so that they don't make any bad assumptions about alignment (which probably has little effect in practice, but better to get it right).  Make the load in _mm_loadh_pi and _mm_loadl_pi a single LLVM IR instruction to make optimizing easier for CodeGen.

rdar://10054986

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

12 years agoAdd an experimental flag -fauto-module-import that automatically turns
Douglas Gregor [Thu, 15 Sep 2011 22:00:41 +0000 (22:00 +0000)]
Add an experimental flag -fauto-module-import that automatically turns
#include or #import direcctives of framework headers into module
imports of the corresponding framework module.

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

12 years agoFinish the lex->LHS and rex->RHS cleanup in Sema.
Richard Trieu [Thu, 15 Sep 2011 21:56:47 +0000 (21:56 +0000)]
Finish the lex->LHS and rex->RHS cleanup in Sema.

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

12 years agoAdd test case for mutually recursive modules
Douglas Gregor [Thu, 15 Sep 2011 20:54:06 +0000 (20:54 +0000)]
Add test case for mutually recursive modules

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

12 years agoComment what's going on when we compile a module
Douglas Gregor [Thu, 15 Sep 2011 20:53:28 +0000 (20:53 +0000)]
Comment what's going on when we compile a module

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

12 years agoreverse patch in r139818 to focus on 'self'
Fariborz Jahanian [Thu, 15 Sep 2011 20:40:18 +0000 (20:40 +0000)]
reverse patch in r139818 to focus on 'self'
instead of 'Class'.

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

12 years agoDetect cyclic module dependencies in a manner that is rather more
Douglas Gregor [Thu, 15 Sep 2011 20:40:10 +0000 (20:40 +0000)]
Detect cyclic module dependencies in a manner that is rather more
graceful than running out of stack space.

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

12 years ago[analyzer] Refactor: make PathDiagnosticLocation responsible for validation of Source...
Anna Zaks [Thu, 15 Sep 2011 20:06:34 +0000 (20:06 +0000)]
[analyzer] Refactor: make PathDiagnosticLocation responsible for validation of SourceLocations (commit 4 of ?):
 - The closing brace is always a single location, not a range.
 - The test case previously had a location key 57:1 followed by a range [57:1 - 57:1].

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

12 years agoEliminate the list of modules from the preprocessor options. This was
Douglas Gregor [Thu, 15 Sep 2011 19:48:59 +0000 (19:48 +0000)]
Eliminate the list of modules from the preprocessor options. This was
used back when we had an -import-module command-line option, but it's
no longer used (or useful).

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

12 years agoEliminate the unused -create-module cc1-level option
Douglas Gregor [Thu, 15 Sep 2011 19:45:56 +0000 (19:45 +0000)]
Eliminate the unused -create-module cc1-level option

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

12 years agoRefactor the load of the exception pointer and the exception selector from their
Bill Wendling [Thu, 15 Sep 2011 18:57:19 +0000 (18:57 +0000)]
Refactor the load of the exception pointer and the exception selector from their
storage slot into helper functions.

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

12 years ago[analyzer] Refactor: make PathDiagnosticLocation responsible for validation of Source...
Anna Zaks [Thu, 15 Sep 2011 18:56:07 +0000 (18:56 +0000)]
[analyzer] Refactor: make PathDiagnosticLocation responsible for validation of SourceLocations (commit 2 of ?):
- Fix a fixme and move the logic of creating a PathDiagnosticLocation corresponding to a ProgramPoint into a PathDiagnosticLocation constructor.
- Rename PathDiagnosticLocation::create to differentiate from the added constructor.

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

12 years agoWhen we load the first module, make sure that we wire up the ASTConsumer to the newly...
Douglas Gregor [Thu, 15 Sep 2011 18:47:32 +0000 (18:47 +0000)]
When we load the first module, make sure that we wire up the ASTConsumer to the newly-created ASTReader. This makes sure that CodeGen sees the declarations it is interested in

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

12 years agoObjective-c: Conversion from type Class to any root class type is allowed
Fariborz Jahanian [Thu, 15 Sep 2011 18:30:22 +0000 (18:30 +0000)]
Objective-c: Conversion from type Class to any root class type is allowed
in class methods with no warning. //rdar://10109725

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

12 years agoThread safety: changing naming in error messages based on reviewer comments
Caitlin Sadowski [Thu, 15 Sep 2011 18:13:32 +0000 (18:13 +0000)]
Thread safety: changing naming in error messages based on reviewer comments

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

12 years agoThread safety: test cases originally from gcc annotalysis branch. We are
Caitlin Sadowski [Thu, 15 Sep 2011 18:07:32 +0000 (18:07 +0000)]
Thread safety: test cases originally from gcc annotalysis branch. We are
relicensing them under the license for llvm.

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

12 years ago[PCH] Overhaul how preprocessed entities are [de]serialized.
Argyrios Kyrtzidis [Thu, 15 Sep 2011 18:02:56 +0000 (18:02 +0000)]
[PCH] Overhaul how preprocessed entities are [de]serialized.

-Use an array of offsets for all preprocessed entities
-Get rid of the separate array of offsets for just macro definitions;
 for references to macro definitions use an index inside the preprocessed
 entities array.
-Deserialize each preprocessed entity lazily, at first request; not in bulk.

Paves the way for binary searching of preprocessed entities that will offer
efficiency and will simplify things on the libclang side a lot.

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

12 years agoThread safety: cleaning up FIXME for trylocks
Caitlin Sadowski [Thu, 15 Sep 2011 17:50:19 +0000 (17:50 +0000)]
Thread safety: cleaning up FIXME for trylocks

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

12 years agoThread safety: completeing the implementation of shared/exclusive locks required...
Caitlin Sadowski [Thu, 15 Sep 2011 17:43:08 +0000 (17:43 +0000)]
Thread safety: completeing the implementation of shared/exclusive locks required attributes

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

12 years agoThread safety: refactoring various out of scope warnings to use the same inteface...
Caitlin Sadowski [Thu, 15 Sep 2011 17:25:19 +0000 (17:25 +0000)]
Thread safety: refactoring various out of scope warnings to use the same inteface. This eliminates a lot of unnecessary duplicated code.

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

12 years agoTeach LangOptions::resetNonModularOptions to actually do what it says it does
Douglas Gregor [Thu, 15 Sep 2011 14:56:27 +0000 (14:56 +0000)]
Teach LangOptions::resetNonModularOptions to actually do what it says it does

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

12 years agoPTX: Define target options
Justin Holewinski [Thu, 15 Sep 2011 12:13:38 +0000 (12:13 +0000)]
PTX: Define target options

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

12 years agoRewrite this loop to use partial destruction; I'm not sure it's
John McCall [Thu, 15 Sep 2011 06:49:18 +0000 (06:49 +0000)]
Rewrite this loop to use partial destruction;  I'm not sure it's
possible for that to matter right now, but eventually I think we'll
need to unify this better, and then it might.  Also, use a more
efficient looping structure.

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

12 years agoSorry, that assertion actually already exists.
John McCall [Thu, 15 Sep 2011 01:55:23 +0000 (01:55 +0000)]
Sorry, that assertion actually already exists.

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

12 years agoWe don't generate null initializer expressions anymore, and
John McCall [Thu, 15 Sep 2011 01:54:21 +0000 (01:54 +0000)]
We don't generate null initializer expressions anymore, and
we don't need to.

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

12 years ago[analyzer] Refactor: make PathDiagnosticLocation responsible for validation of Source...
Anna Zaks [Thu, 15 Sep 2011 01:08:34 +0000 (01:08 +0000)]
[analyzer] Refactor: make PathDiagnosticLocation responsible for validation of SourceLocations (commit 2 of ?):
- Modify all PathDiagnosticLocation constructors that take Stmt to also requre LocationContext.
- Add a constructor which should be used in case there is no valid statement/location (it will grab the location of the enclosing function).

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

12 years agoEmit debug info for c++0x nullptr.
Devang Patel [Wed, 14 Sep 2011 23:14:14 +0000 (23:14 +0000)]
Emit debug info for c++0x nullptr.

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

12 years agoMake -E work with module imports
Douglas Gregor [Wed, 14 Sep 2011 23:13:09 +0000 (23:13 +0000)]
Make -E work with module imports

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

12 years agoDon't try to write a macro offset for an identifier that names a non-exported macro...
Douglas Gregor [Wed, 14 Sep 2011 22:14:14 +0000 (22:14 +0000)]
Don't try to write a macro offset for an identifier that names a non-exported macro, for real this time

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

12 years agoRevert my exported-macro hackery. Something is amiss
Douglas Gregor [Wed, 14 Sep 2011 20:57:14 +0000 (20:57 +0000)]
Revert my exported-macro hackery. Something is amiss

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

12 years agoThread safety: small fixes in comments
Caitlin Sadowski [Wed, 14 Sep 2011 20:54:57 +0000 (20:54 +0000)]
Thread safety: small fixes in comments

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

12 years agoMake sure that we actually keep the key length and data length in sync when dealing...
Douglas Gregor [Wed, 14 Sep 2011 20:51:12 +0000 (20:51 +0000)]
Make sure that we actually keep the key length and data length in sync when dealing with non-exported macros

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

12 years agoDisable this test on win32. My "sleep 2" trick didn't seem to work
Douglas Gregor [Wed, 14 Sep 2011 20:38:11 +0000 (20:38 +0000)]
Disable this test on win32. My "sleep 2" trick didn't seem to work

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

12 years agoDon't try to write a macro offset for an identifier that names a non-exported macro
Douglas Gregor [Wed, 14 Sep 2011 20:36:30 +0000 (20:36 +0000)]
Don't try to write a macro offset for an identifier that names a non-exported macro

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

12 years agoAdd test for the driver's handling of modules
Douglas Gregor [Wed, 14 Sep 2011 20:29:10 +0000 (20:29 +0000)]
Add test for the driver's handling of modules

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

12 years agoTeach the driver to always pass down a module cache path. If none is
Douglas Gregor [Wed, 14 Sep 2011 20:28:46 +0000 (20:28 +0000)]
Teach the driver to always pass down a module cache path. If none is
supplied, use something derived from the system's temporary
directory. Depends on LLVM r139725.

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

12 years agoThread safety: reverting to use separate warning for requirement to hold any lock
Caitlin Sadowski [Wed, 14 Sep 2011 20:09:09 +0000 (20:09 +0000)]
Thread safety: reverting to use separate warning for requirement to hold any lock

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

12 years agoThread safety: adding additional documentation to the main thread safety interface...
Caitlin Sadowski [Wed, 14 Sep 2011 20:05:09 +0000 (20:05 +0000)]
Thread safety: adding additional documentation to the main thread safety interface, and making the destructor for the thread safety handler pure virtual

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

12 years agoThread safety: adding test cases for unparseable lock expressions and expanding the...
Caitlin Sadowski [Wed, 14 Sep 2011 20:00:24 +0000 (20:00 +0000)]
Thread safety: adding test cases for unparseable lock expressions and expanding the handling of these expressions

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

12 years agoPlug an abstraction leak and fix a crasher in DiagnoseInvalidRedeclaration
Kaelyn Uhrain [Wed, 14 Sep 2011 19:37:32 +0000 (19:37 +0000)]
Plug an abstraction leak and fix a crasher in DiagnoseInvalidRedeclaration

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

12 years agoPR10864: make sure we correctly delay type-checking for inline asm tied operands...
Eli Friedman [Wed, 14 Sep 2011 19:20:00 +0000 (19:20 +0000)]
PR10864: make sure we correctly delay type-checking for inline asm tied operands with dependent type.  Patch by Likai Liu.

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

12 years agoUse a group for a diagnostics I added late.
Fariborz Jahanian [Wed, 14 Sep 2011 19:02:25 +0000 (19:02 +0000)]
Use a group for a diagnostics I added late.

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

12 years ago[arcmt] Use __bridge_retained when passing an objc object to a CF parameter
Argyrios Kyrtzidis [Wed, 14 Sep 2011 18:17:09 +0000 (18:17 +0000)]
[arcmt] Use __bridge_retained when passing an objc object to a CF parameter
annotated with cf_consumed attribute.

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

12 years agoobjc-arc: warn when a 'retain' block property is
Fariborz Jahanian [Wed, 14 Sep 2011 18:03:46 +0000 (18:03 +0000)]
objc-arc: warn when a 'retain' block property is
declared which does not force a 'copy' of the block literal
object. // rdar://9829425

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

12 years ago[analyzer] Remove redundant copy constructor.
Anna Zaks [Wed, 14 Sep 2011 17:53:23 +0000 (17:53 +0000)]
[analyzer] Remove redundant copy constructor.

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

12 years ago[analyzer] After CFG has been linearized, we can have a situation where an ExpoledNod...
Anna Zaks [Wed, 14 Sep 2011 17:48:01 +0000 (17:48 +0000)]
[analyzer] After CFG has been linearized, we can have a situation where an ExpoledNode has an invalid SourceLocation (which has no correspondence in the source code). This commit is the first step to solve this problem.
 - It adds LocationContext to the PathDiagnosticLocation object and uses it to lookup the enclosing statement with a valid location.
 - So far, the LocationContext is only available when the object is constructed from the ExplodedNode.
 - Already found some subtle bugs(in plist-output-alternate.m) where the intermediate diagnostic steps were not previously shown.

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

12 years agoAdd comment.
Akira Hatanaka [Wed, 14 Sep 2011 17:24:05 +0000 (17:24 +0000)]
Add comment.

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

12 years agoEncode the module hash in base-36, to reduce the length of the strings a bit
Douglas Gregor [Wed, 14 Sep 2011 15:55:12 +0000 (15:55 +0000)]
Encode the module hash in base-36, to reduce the length of the strings a bit

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

12 years agoFormatting.
Eric Christopher [Wed, 14 Sep 2011 01:10:50 +0000 (01:10 +0000)]
Formatting.

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

12 years agoFix comment.
Eli Friedman [Wed, 14 Sep 2011 00:52:45 +0000 (00:52 +0000)]
Fix comment.

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

12 years ago[driver] Add support for the COMPILER_PATH environment variable, which adds the
Chad Rosier [Wed, 14 Sep 2011 00:47:55 +0000 (00:47 +0000)]
[driver] Add support for the COMPILER_PATH environment variable, which adds the
specified path(s) to the list of prefix directories.
rdar://10097714

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

12 years ago[analyzer] Refactor: Make PathDiagnosticLocation responsible for creating a valid...
Anna Zaks [Wed, 14 Sep 2011 00:25:17 +0000 (00:25 +0000)]
[analyzer] Refactor: Make PathDiagnosticLocation responsible for creating a valid object given an ExploadedNode (the same logic can be reused by other checkers).

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

12 years agoFix typo.
Eric Christopher [Tue, 13 Sep 2011 23:45:09 +0000 (23:45 +0000)]
Fix typo.

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

12 years agoAssert that the module hash produced after stripping away non-modular options is...
Douglas Gregor [Tue, 13 Sep 2011 23:20:27 +0000 (23:20 +0000)]
Assert that the module hash produced after stripping away non-modular options is the same as the module hash before stripping those options.

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

12 years agoFor modules, use a hash of the compiler version, language options, and
Douglas Gregor [Tue, 13 Sep 2011 23:15:45 +0000 (23:15 +0000)]
For modules, use a hash of the compiler version, language options, and
target triple to separate modules built under different
conditions. The hash is used to create a subdirectory in the module
cache path where other invocations of the compiler (with the same
version, language options, etc.) can find the precompiled modules.

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

12 years ago[libclang] Remove libclang.darwin.exports, it's not used anymore.
Argyrios Kyrtzidis [Tue, 13 Sep 2011 23:12:36 +0000 (23:12 +0000)]
[libclang] Remove libclang.darwin.exports, it's not used anymore.

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

12 years agoIn general, don't look through explicit casts when trying
John McCall [Tue, 13 Sep 2011 23:08:34 +0000 (23:08 +0000)]
In general, don't look through explicit casts when trying
to find the called declaration.  Explicit casts can radically
change the semantics of a call, and it's no longer really a
builtin call any more than it would be a builtin call if you stored
the function pointer into a variable and called that.

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

12 years agoCorrectly generate IR for casted "builtin" functions, where
John McCall [Tue, 13 Sep 2011 23:05:03 +0000 (23:05 +0000)]
Correctly generate IR for casted "builtin" functions, where
the builtin is really just a predefined declaration.  These are
totally valid to cast.

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

12 years agoO64 will not be supported.
Akira Hatanaka [Tue, 13 Sep 2011 22:47:52 +0000 (22:47 +0000)]
O64 will not be supported.

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

12 years agomips*-*-psp is no longer supported as a target.
Akira Hatanaka [Tue, 13 Sep 2011 22:46:13 +0000 (22:46 +0000)]
mips*-*-psp is no longer supported as a target.

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

12 years agoSplit the two invalid uses of the unqualified Foobar at line 3 to two lines
Kaelyn Uhrain [Tue, 13 Sep 2011 22:31:32 +0000 (22:31 +0000)]
Split the two invalid uses of the unqualified Foobar at line 3 to two lines
so that it is clearer which use triggered which error.

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

12 years agoRe-commit r139643.
Eli Friedman [Tue, 13 Sep 2011 22:21:56 +0000 (22:21 +0000)]
Re-commit r139643.

Make clang use Acquire loads and Release stores where necessary.

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

12 years agoRevert r139643 while I look into it; it's breaking selfhost.
Eli Friedman [Tue, 13 Sep 2011 22:08:16 +0000 (22:08 +0000)]
Revert r139643 while I look into it; it's breaking selfhost.

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

12 years ago[libclang] Introduce clang_getPresumedLocation which works like clang_getExpansionLoc...
Argyrios Kyrtzidis [Tue, 13 Sep 2011 21:49:08 +0000 (21:49 +0000)]
[libclang] Introduce clang_getPresumedLocation which works like clang_getExpansionLocation
but takes into account #line directives coming from preprocessed files.

Patch by Vinay Sajip!

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

12 years ago[PCH] Fix a regression that r139441 introduced (decls were getting passed
Argyrios Kyrtzidis [Tue, 13 Sep 2011 21:35:00 +0000 (21:35 +0000)]
[PCH] Fix a regression that r139441 introduced (decls were getting passed
to the consumer without being fully deserialized).

The regression was on compiling boost.python and it was too difficult to get a reduced
test case unfortunately.

Also modify the logic of how objc methods are getting passed to the consumer;
codegen depended on receiving objc methods before the implementation decl.
Since the interesting objc methods are ones with a body and such methods only
exist inside an ObjCImplDecl, deserialize and pass to consumer all the methods
of ObCImplDecl when we see one.

Fixes http://llvm.org/PR10922 & rdar://10117105.

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

12 years agoMake clang use Acquire loads and Release stores where necessary.
Eli Friedman [Tue, 13 Sep 2011 21:31:32 +0000 (21:31 +0000)]
Make clang use Acquire loads and Release stores where necessary.

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

12 years agoTurn off the generation of unaligned atomic load/store; I'm going to explicitly error...
Eli Friedman [Tue, 13 Sep 2011 20:48:30 +0000 (20:48 +0000)]
Turn off the generation of unaligned atomic load/store; I'm going to explicitly error out on such cases in the backend, at least for the moment.

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

12 years agoWhen building a module on-demand, clear out the "non-modular" language
Douglas Gregor [Tue, 13 Sep 2011 20:44:41 +0000 (20:44 +0000)]
When building a module on-demand, clear out the "non-modular" language
and preprocessor options (such as macro definitions) first.

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

12 years ago[libclang] Correct annotation and taking of cursor for objc class references
Argyrios Kyrtzidis [Tue, 13 Sep 2011 18:49:56 +0000 (18:49 +0000)]
[libclang] Correct annotation and taking of cursor for objc class references
inside the IBOutletCollection attribute.

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

12 years agoRename InterFace -> Interface, no functionality change.
Argyrios Kyrtzidis [Tue, 13 Sep 2011 18:49:52 +0000 (18:49 +0000)]
Rename InterFace -> Interface, no functionality change.

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

12 years agoA strong property of block type has "copy" setter semantics, not "retain".
John McCall [Tue, 13 Sep 2011 18:49:24 +0000 (18:49 +0000)]
A strong property of block type has "copy" setter semantics, not "retain".
This is consistent with the behavior of assigning into a __strong l-value,
and it's also necessary for ensuring that the ivar doesn't end up a dangling
reference.  We decided not to change the behavior of "retain" properties, but
just to make them warnings/errors when of block type.

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