]> granicus.if.org Git - clang/log
clang
14 years agoPatch to fix a crash trying to access a category name in
Fariborz Jahanian [Fri, 11 Dec 2009 00:26:36 +0000 (00:26 +0000)]
Patch to fix a crash trying to access a category name in
objective-c++ mode and also removed dead-code in this area.
(fixes radar 7456710).

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

14 years agoTestcase for recent checkin.
Mike Stump [Fri, 11 Dec 2009 00:10:15 +0000 (00:10 +0000)]
Testcase for recent checkin.

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

14 years agoImplement just a bit more of inline assembly.
Mike Stump [Fri, 11 Dec 2009 00:04:56 +0000 (00:04 +0000)]
Implement just a bit more of inline assembly.

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

14 years agoFix spacing.
Mike Stump [Fri, 11 Dec 2009 00:02:10 +0000 (00:02 +0000)]
Fix spacing.

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

14 years agoDon't complain about falling off the end of a function with an asm
Mike Stump [Thu, 10 Dec 2009 22:57:48 +0000 (22:57 +0000)]
Don't complain about falling off the end of a function with an asm
block, if the function is supposed to return a value as we don't know
exactly what the asm code does.

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

14 years agoclang_getCompletionChunkText() will treat optional strings as empty text blocks
Douglas Gregor [Thu, 10 Dec 2009 22:46:19 +0000 (22:46 +0000)]
clang_getCompletionChunkText() will treat optional strings as empty text blocks

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

14 years agoSupport unary type traits in a scalar context. Not that I've actually seen
Eli Friedman [Thu, 10 Dec 2009 22:40:32 +0000 (22:40 +0000)]
Support unary type traits in a scalar context.  Not that I've actually seen
this construct, but might as well for completeness.

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

14 years agoClean up enum constants so that they're finally sane. Fixes PR3173 and a
Eli Friedman [Thu, 10 Dec 2009 22:29:29 +0000 (22:29 +0000)]
Clean up enum constants so that they're finally sane.  Fixes PR3173 and a
recently introduced crash.

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

14 years agoMake sure that explicitly instantiated functions get the right linkage.
Anders Carlsson [Thu, 10 Dec 2009 22:25:34 +0000 (22:25 +0000)]
Make sure that explicitly instantiated functions get the right linkage.

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

14 years agoBeef up Clang-on-LLVM testing a bit, by making LLVM-Syntax recursive
Douglas Gregor [Thu, 10 Dec 2009 22:08:55 +0000 (22:08 +0000)]
Beef up Clang-on-LLVM testing a bit, by making LLVM-Syntax recursive
(since we now parse all of the headers appropriately) and teaching
LLVM-Code-Syntax about the extra paths needed to parse the backends.

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

14 years agoPrivatize class members.
Benjamin Kramer [Thu, 10 Dec 2009 21:50:21 +0000 (21:50 +0000)]
Privatize class members.

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

14 years agoActually try to trigger the last diagnostic in the declaration-collision test case.
John McCall [Thu, 10 Dec 2009 21:17:25 +0000 (21:17 +0000)]
Actually try to trigger the last diagnostic in the declaration-collision test case.
Surprisingly, we *do* diagnose one of them.  Since we don't really track scopes into
instantiation, this has to signal some kind of bug.

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

14 years agoNo need to add -x objecitve-c++
Fariborz Jahanian [Thu, 10 Dec 2009 20:57:43 +0000 (20:57 +0000)]
No need to add -x objecitve-c++

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

14 years agoAdd support for finding composite type of twp objective-c pointers
Fariborz Jahanian [Thu, 10 Dec 2009 20:46:08 +0000 (20:46 +0000)]
Add support for finding composite type of twp objective-c pointers
in objective-c++ mode.

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

14 years agoImprove the diagnostic when a new declaration conflicts with a using shadow
John McCall [Thu, 10 Dec 2009 19:51:03 +0000 (19:51 +0000)]
Improve the diagnostic when a new declaration conflicts with a using shadow
declaration.  Rename note_using_decl to note_using, which is possibly less confusing.
Add a test for non-class-scope using decl collisions and be sure to note the case
we can't diagnose yet.

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

14 years agoMove composite type finding of two objective-c expressions
Fariborz Jahanian [Thu, 10 Dec 2009 19:47:41 +0000 (19:47 +0000)]
Move composite type finding of two objective-c expressions
into its own helper method. No change in functionality.

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

14 years agoImplement C++ DR437, which involves exception-specifications that name
Douglas Gregor [Thu, 10 Dec 2009 18:13:52 +0000 (18:13 +0000)]
Implement C++ DR437, which involves exception-specifications that name
a type currently being defined, from Nicola Gigante!

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

14 years agoMove initialization via initializer list over to InitializationSequences.
Douglas Gregor [Thu, 10 Dec 2009 17:56:55 +0000 (17:56 +0000)]
Move initialization via initializer list over to InitializationSequences.

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

14 years agoImplement redeclaration checking and hiding semantics for using declarations. There
John McCall [Thu, 10 Dec 2009 09:41:52 +0000 (09:41 +0000)]
Implement redeclaration checking and hiding semantics for using declarations.  There
are a couple of O(n^2) operations in this, some analogous to the usual O(n^2)
redeclaration problem and some not.  In particular, retroactively removing
shadow declarations when they're hidden by later decls is pretty unfortunate.
I'm not yet convinced it's worse than the alternative, though.

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

14 years agoFix for PR5515: allow "merging" array bounds both forwards and backwards.
Eli Friedman [Thu, 10 Dec 2009 08:54:47 +0000 (08:54 +0000)]
Fix for PR5515: allow "merging" array bounds both forwards and backwards.

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

14 years agoTest for r90950.
Eli Friedman [Thu, 10 Dec 2009 08:51:23 +0000 (08:51 +0000)]
Test for r90950.

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

14 years agoMangle static variables inside Objective-C methods in Objective-C++. We currently...
Anders Carlsson [Thu, 10 Dec 2009 03:14:39 +0000 (03:14 +0000)]
Mangle static variables inside Objective-C methods in Objective-C++. We currently mangle them the same way as gcc does.

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

14 years agoGet rid of static variable.
Eli Friedman [Thu, 10 Dec 2009 02:21:21 +0000 (02:21 +0000)]
Get rid of static variable.

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

14 years agoIf we enter parens, colons can become un-sacred, allowing us to emit
Chris Lattner [Thu, 10 Dec 2009 02:08:07 +0000 (02:08 +0000)]
If we enter parens, colons can become un-sacred, allowing us to emit
a better diagnostic in the second example.

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

14 years agofix a more evil case of : / :: confusion arising in ?:.
Chris Lattner [Thu, 10 Dec 2009 02:02:58 +0000 (02:02 +0000)]
fix a more evil case of : / :: confusion arising in ?:.

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

14 years agofix incorrect parsing of bitfields pointed out by Doug. I chose
Chris Lattner [Thu, 10 Dec 2009 01:59:24 +0000 (01:59 +0000)]
fix incorrect parsing of bitfields pointed out by Doug.  I chose
to use ColonProtectionRAIIObject in the C codepath even though it
won't matter for consistency.

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

14 years agoActually store the pointer into the global variable, spotted by Eli.
Anders Carlsson [Thu, 10 Dec 2009 01:58:33 +0000 (01:58 +0000)]
Actually store the pointer into the global variable, spotted by Eli.

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

14 years agoSetup cleanup on eh edge out of the construction of the cleanup object
Mike Stump [Thu, 10 Dec 2009 01:52:30 +0000 (01:52 +0000)]
Setup cleanup on eh edge out of the construction of the cleanup object
during throw to deallocate the exception object.  WIP.

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

14 years agominimal fix for PR5743
Chris Lattner [Thu, 10 Dec 2009 01:38:15 +0000 (01:38 +0000)]
minimal fix for PR5743

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

14 years agoHandle emitting static variables that have reference type.
Anders Carlsson [Thu, 10 Dec 2009 01:05:11 +0000 (01:05 +0000)]
Handle emitting static variables that have reference type.

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

14 years agoSeparate generating code for static variables and global variables.
Anders Carlsson [Thu, 10 Dec 2009 00:57:45 +0000 (00:57 +0000)]
Separate generating code for static variables and global variables.

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

14 years agoFix tabs.
Anders Carlsson [Thu, 10 Dec 2009 00:57:18 +0000 (00:57 +0000)]
Fix tabs.

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

14 years agoSecond half of r91023, saving files is good.
Chris Lattner [Thu, 10 Dec 2009 00:45:15 +0000 (00:45 +0000)]
Second half of r91023, saving files is good.

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

14 years agomove GreaterThanIsOperatorScope into RAIIObjectsForParser. Add some more
Chris Lattner [Thu, 10 Dec 2009 00:44:03 +0000 (00:44 +0000)]
move GreaterThanIsOperatorScope into RAIIObjectsForParser.  Add some more
TODOs for other classes that could be moved out of Parser.h.  I don't plan
to do these in the near term though.

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

14 years agofix PR5740: a colon is sacred when parsing case statement expressions!
Chris Lattner [Thu, 10 Dec 2009 00:38:54 +0000 (00:38 +0000)]
fix PR5740: a colon is sacred when parsing case statement expressions!

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

14 years agorename testcase
Chris Lattner [Thu, 10 Dec 2009 00:37:13 +0000 (00:37 +0000)]
rename testcase

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

14 years agorefactor the 'ColonIsSacred' argument to ParseOptionalCXXScopeSpecifier
Chris Lattner [Thu, 10 Dec 2009 00:32:41 +0000 (00:32 +0000)]
refactor the 'ColonIsSacred' argument to ParseOptionalCXXScopeSpecifier
to be a bool in Parser that is twiddled by the ColonProtectionRAIIObject
class.  No functionality change.

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

14 years agoMove more decl related functions to CGDeclCXX.cpp
Anders Carlsson [Thu, 10 Dec 2009 00:30:05 +0000 (00:30 +0000)]
Move more decl related functions to CGDeclCXX.cpp

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

14 years agorename ExtensionRAIIObject.h -> RAIIObjectsForParser.h
Chris Lattner [Thu, 10 Dec 2009 00:21:05 +0000 (00:21 +0000)]
rename ExtensionRAIIObject.h -> RAIIObjectsForParser.h

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

14 years agoAdd CGDeclCXX.cpp and move EmitCXXGlobalVarDeclInit there.
Anders Carlsson [Thu, 10 Dec 2009 00:16:00 +0000 (00:16 +0000)]
Add CGDeclCXX.cpp and move EmitCXXGlobalVarDeclInit there.

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

14 years agospread 'const' love to some variables. this considerably reduces the amount of dirty...
Nuno Lopes [Thu, 10 Dec 2009 00:07:02 +0000 (00:07 +0000)]
spread 'const' love to some variables. this considerably reduces the amount of dirty data around.

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

14 years agoFixup spacing.
Mike Stump [Thu, 10 Dec 2009 00:06:18 +0000 (00:06 +0000)]
Fixup spacing.

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

14 years agoFix spacing.
Mike Stump [Thu, 10 Dec 2009 00:05:14 +0000 (00:05 +0000)]
Fix spacing.

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

14 years agoEnsure we only generate one terminate handler.
Mike Stump [Thu, 10 Dec 2009 00:02:42 +0000 (00:02 +0000)]
Ensure we only generate one terminate handler.

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

14 years agoRemove obsolete FIXME and some dead fallback code.
Mike Stump [Wed, 9 Dec 2009 23:52:09 +0000 (23:52 +0000)]
Remove obsolete FIXME and some dead fallback code.

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

14 years agoAdd terminate handler to cleanups on exceptional edges.
Mike Stump [Wed, 9 Dec 2009 23:49:53 +0000 (23:49 +0000)]
Add terminate handler to cleanups on exceptional edges.

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

14 years agoCode gen for ObjCIsaExpr AST used as lvalue.
Fariborz Jahanian [Wed, 9 Dec 2009 23:35:29 +0000 (23:35 +0000)]
Code gen for ObjCIsaExpr AST used as lvalue.
(fixes radar 7457534).

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

14 years agoAdd terminate handler for copy constructors for thrown objects. WIP.
Mike Stump [Wed, 9 Dec 2009 23:31:35 +0000 (23:31 +0000)]
Add terminate handler for copy constructors for thrown objects.  WIP.

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

14 years agoFix null dereference in OSAtomicChecker and special case SymbolicRegions. We still...
Ted Kremenek [Wed, 9 Dec 2009 23:29:55 +0000 (23:29 +0000)]
Fix null dereference in OSAtomicChecker and special case SymbolicRegions.  We still aren't handling them correctly; I've added to failing test cases to test/Analysis/NSString-failed-cases.m that should pass and then be merged in to test/Analysis/NSString.m.

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

14 years agoReimplement reference initialization (C++ [dcl.init.ref]) using the
Douglas Gregor [Wed, 9 Dec 2009 23:02:17 +0000 (23:02 +0000)]
Reimplement reference initialization (C++ [dcl.init.ref]) using the
new notion of an "initialization sequence", which encapsulates the
computation of the initialization sequence along with diagnostic
information and the capability to turn the computed sequence into an
expression. At present, I've only switched one CheckReferenceInit
callers over to this new mechanism; more will follow.

Aside from (hopefully) being much more true to the standard, the
diagnostics provided by this reference-initialization code are a bit
better than before. Some examples:

p5-var.cpp:54:12: error: non-const lvalue reference to type 'struct
Derived'
      cannot bind to a value of unrelated type 'struct Base'
  Derived &dr2 = b; // expected-error{{non-const lvalue reference to
  ...
           ^     ~
p5-var.cpp:55:9: error: binding of reference to type 'struct Base' to
a value of
      type 'struct Base const' drops qualifiers
  Base &br3 = bc; // expected-error{{drops qualifiers}}
        ^     ~~

p5-var.cpp:57:15: error: ambiguous conversion from derived class
      'struct Diamond' to base class 'struct Base':
    struct Diamond -> struct Derived -> struct Base
    struct Diamond -> struct Derived2 -> struct Base
  Base &br5 = diamond; // expected-error{{ambiguous conversion from
      ...
              ^~~~~~~
p5-var.cpp:59:9: error: non-const lvalue reference to type 'long'
      cannot bind to
      a value of unrelated type 'int'
  long &lr = i; // expected-error{{non-const lvalue reference to type
      ...
        ^    ~

p5-var.cpp:74:9: error: non-const lvalue reference to type 'struct
Base' cannot
      bind to a temporary of type 'struct Base'
  Base &br1 = Base(); // expected-error{{non-const lvalue reference to
  ...
        ^     ~~~~~~

p5-var.cpp:102:9: error: non-const reference cannot bind to bit-field
'i'
  int & ir1 = (ib.i); // expected-error{{non-const reference cannot
  ...
        ^     ~~~~~~
p5-var.cpp:98:7: note: bit-field is declared here
  int i : 17; // expected-note{{bit-field is declared here}}
      ^

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

14 years agoBreak out code for reuse. WIP.
Mike Stump [Wed, 9 Dec 2009 22:59:31 +0000 (22:59 +0000)]
Break out code for reuse.  WIP.

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

14 years agoFixes a bogus error when declaring an extern "C" array.
Fariborz Jahanian [Wed, 9 Dec 2009 21:39:38 +0000 (21:39 +0000)]
Fixes a bogus error when declaring an extern "C" array.
(fixes radar 7457109).

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

14 years agoAdd throw support. WIP.
Mike Stump [Wed, 9 Dec 2009 19:24:08 +0000 (19:24 +0000)]
Add throw support.  WIP.

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

14 years agoCodegen. support for ObjCIsaExpr AST which until now
Fariborz Jahanian [Wed, 9 Dec 2009 19:05:56 +0000 (19:05 +0000)]
Codegen. support for ObjCIsaExpr AST which until now
was not needed (fixes radar 7453430).

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

14 years agoFix 80-col violation.
Mike Stump [Wed, 9 Dec 2009 18:09:35 +0000 (18:09 +0000)]
Fix 80-col violation.

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

14 years agoAdd DeclContext::dump.
Anders Carlsson [Wed, 9 Dec 2009 17:27:46 +0000 (17:27 +0000)]
Add DeclContext::dump.

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

14 years agoRefactor OSAtomic evaluation logic into OSAtomicChecker.
Zhongxing Xu [Wed, 9 Dec 2009 12:23:28 +0000 (12:23 +0000)]
Refactor OSAtomic evaluation logic into OSAtomicChecker.

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

14 years agoUse a temporary destination set such that we can clear fake auto transitions.
Zhongxing Xu [Wed, 9 Dec 2009 12:16:07 +0000 (12:16 +0000)]
Use a temporary destination set such that we can clear fake auto transitions.
Otherwise, even when real evaluation occurs, the previous fake auto
transitions would still be in the destination set, causing fake state
bifurcation.

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

14 years agoclang -cc1: Mark -i* options as JoinedOrSeparate, since the driver forwards them
Daniel Dunbar [Wed, 9 Dec 2009 10:01:26 +0000 (10:01 +0000)]
clang -cc1: Mark -i* options as JoinedOrSeparate, since the driver forwards them
directly and one can write '-includefoo' if one really wants to.

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

14 years agoFirst pass at implementing C++ enum semantics: calculate (and store) an
John McCall [Wed, 9 Dec 2009 09:09:27 +0000 (09:09 +0000)]
First pass at implementing C++ enum semantics:  calculate (and store) an
"integer promotion" type associated with an enum decl, and use this type to
determine which type to promote to.  This type obeys C++ [conv.prom]p2 and
is therefore generally signed unless the range of the enumerators forces
it to be unsigned.

Kills off a lot of false positives from -Wsign-compare in C++, addressing
rdar://7455616

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

14 years agoOSAtomic simulation: use the original region as the location to load from,
Zhongxing Xu [Wed, 9 Dec 2009 08:32:57 +0000 (08:32 +0000)]
OSAtomic simulation: use the original region as the location to load from,
instead of the ElementRegion obtained from casts.

Test cast: the leak cannot occur bacause the true branch cannot be taken.

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

14 years agoLook through using declarations when searching for allocation overloads.
Anders Carlsson [Wed, 9 Dec 2009 07:39:44 +0000 (07:39 +0000)]
Look through using declarations when searching for allocation overloads.

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

14 years agoUpdate checker build.
Ted Kremenek [Wed, 9 Dec 2009 06:58:36 +0000 (06:58 +0000)]
Update checker build.

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

14 years agoremove dead code.
Zhongxing Xu [Wed, 9 Dec 2009 05:52:12 +0000 (05:52 +0000)]
remove dead code.

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

14 years agoInsert instead of assign to the dest node set, since we use the dest node set
Zhongxing Xu [Wed, 9 Dec 2009 05:48:53 +0000 (05:48 +0000)]
Insert instead of assign to the dest node set, since we use the dest node set
repeatedly.

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

14 years agoFix for PR5730: make sure to consistently call
Eli Friedman [Wed, 9 Dec 2009 04:53:56 +0000 (04:53 +0000)]
Fix for PR5730: make sure to consistently call
PerformObjectArgumentInitialization from BuildCXXMemberCallExpr.

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

14 years agoWhitespace fix.
Eli Friedman [Wed, 9 Dec 2009 04:52:43 +0000 (04:52 +0000)]
Whitespace fix.

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

14 years agoIn CXXRecordDecl::forallBases, add the base to the "queue", so we walk more than...
Anders Carlsson [Wed, 9 Dec 2009 04:26:02 +0000 (04:26 +0000)]
In CXXRecordDecl::forallBases, add the base to the "queue", so we walk more than one heirarchy of classes. John, please review.

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

14 years agoAdd notes to a test case.
Zhongxing Xu [Wed, 9 Dec 2009 04:22:30 +0000 (04:22 +0000)]
Add notes to a test case.

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

14 years agoFix crash in DisplayFunction(). ObjCInterfaceDecls can also get passed to this funct...
Ted Kremenek [Wed, 9 Dec 2009 03:45:19 +0000 (03:45 +0000)]
Fix crash in DisplayFunction().  ObjCInterfaceDecls can also get passed to this function, but we don't want to display them.

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

14 years agoDon't warn about function templates or function template specializations.
Anders Carlsson [Wed, 9 Dec 2009 03:44:46 +0000 (03:44 +0000)]
Don't warn about function templates or function template specializations.

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

14 years agoAdd cleanups for exceptional edges. WIP.
Mike Stump [Wed, 9 Dec 2009 03:35:49 +0000 (03:35 +0000)]
Add cleanups for exceptional edges.  WIP.

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

14 years agoRename Sema::IsOverload to Sema::CheckOverload. Teach it to ignore unresolved
John McCall [Wed, 9 Dec 2009 03:35:25 +0000 (03:35 +0000)]
Rename Sema::IsOverload to Sema::CheckOverload.  Teach it to ignore unresolved
using value decls;  we optimistically assume they won't turn into conflicts.
Teach it to tell the caller *why* the function doesn't overload with the returned
decl;  this will be useful for using hiding.

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

14 years agoMove the missing prototypes checking out into a new function. Don't warn about inline...
Anders Carlsson [Wed, 9 Dec 2009 03:30:09 +0000 (03:30 +0000)]
Move the missing prototypes checking out into a new function. Don't warn about inline functions. Add a test.

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

14 years agoFix for PR5709: use the computed type of the declaration instead of the
Eli Friedman [Wed, 9 Dec 2009 03:05:59 +0000 (03:05 +0000)]
Fix for PR5709: use the computed type of the declaration instead of the
type of the builtin when generating the function declaration for a builtin
library call.

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

14 years agoPass the current SourceLocation to getAssignOperatorMethod, fixing a crash when the...
Anders Carlsson [Wed, 9 Dec 2009 03:01:51 +0000 (03:01 +0000)]
Pass the current SourceLocation to getAssignOperatorMethod, fixing a crash when the assign operator method needs to be instantiated. Doug, please review the updated default-assignment-operator.cpp change.

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

14 years agoFix a horrid bug in GRExprEngine::CheckerVisit() that was identified
Ted Kremenek [Wed, 9 Dec 2009 02:45:41 +0000 (02:45 +0000)]
Fix a horrid bug in GRExprEngine::CheckerVisit() that was identified
by the test case in PR 5627.  Essentially we shouldn't clear the
ExplodedNodeSet where we deposit newly constructed nodes if that set
is the 'Dst' set passed in.  It is not okay to clear that set because
it may already contain nodes.

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

14 years agoNeil points out that this could be simplified, do it.
Chris Lattner [Wed, 9 Dec 2009 02:08:14 +0000 (02:08 +0000)]
Neil points out that this could be simplified, do it.

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

14 years agoAdd support for the cleanup attribute for C++; we don't have to copy
Mike Stump [Wed, 9 Dec 2009 01:50:36 +0000 (01:50 +0000)]
Add support for the cleanup attribute for C++; we don't have to copy
all of g++'s bugs.

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

14 years agoImplemented an implicit conversion from "noreturn" function types (and
Douglas Gregor [Wed, 9 Dec 2009 00:47:37 +0000 (00:47 +0000)]
Implemented an implicit conversion from "noreturn" function types (and
pointers thereof) to their corresponding non-noreturn function
types. This conversion is considered an exact match for
overload-resolution purposes. Note that we are a little more strict
that GCC is, because we encode noreturn in the type system, but that's
a Good Thing (TM) because it does not allow us to pretend that
potentially-returning function pointers are non-returning function
pointers.

Fxies PR5620.

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

14 years agoImprove test portability; I can't figure out how to get the regexp library to
Daniel Dunbar [Wed, 9 Dec 2009 00:04:46 +0000 (00:04 +0000)]
Improve test portability; I can't figure out how to get the regexp library to
match $ correctly with \r\n, unfortunately.

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

14 years agoAdded a missing case to a switch statement.
Fariborz Jahanian [Tue, 8 Dec 2009 23:46:15 +0000 (23:46 +0000)]
Added a missing case to a switch statement.

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

14 years agoIncrease inlining threshold at -O3, to match llvm-gcc.
Daniel Dunbar [Tue, 8 Dec 2009 23:15:55 +0000 (23:15 +0000)]
Increase inlining threshold at -O3, to match llvm-gcc.

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

14 years agoMore detailed analysis of typecast to an objective-c pointer
Fariborz Jahanian [Tue, 8 Dec 2009 23:09:15 +0000 (23:09 +0000)]
More detailed analysis of typecast to an objective-c pointer
in objective-c++ mode without being too lenient.

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

14 years agoHandle unresolved using decls in bare lookups. These are not being adequately
John McCall [Tue, 8 Dec 2009 22:45:53 +0000 (22:45 +0000)]
Handle unresolved using decls in bare lookups.  These are not being adequately
tested.  Fixes PR5727.

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

14 years agoImprove test portability.
Daniel Dunbar [Tue, 8 Dec 2009 22:22:20 +0000 (22:22 +0000)]
Improve test portability.

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

14 years agoMake the BugType.h header self-contained so Daniel will stop bugging me ;)
Anders Carlsson [Tue, 8 Dec 2009 22:16:41 +0000 (22:16 +0000)]
Make the BugType.h header self-contained so Daniel will stop bugging me ;)

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

14 years agoAdd fixme.
Mike Stump [Tue, 8 Dec 2009 22:12:48 +0000 (22:12 +0000)]
Add fixme.

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

14 years agoRemove include of system header.
Daniel Dunbar [Tue, 8 Dec 2009 21:52:24 +0000 (21:52 +0000)]
Remove include of system header.

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

14 years agoRemove some old code. WIP.
Mike Stump [Tue, 8 Dec 2009 21:46:41 +0000 (21:46 +0000)]
Remove some old code.  WIP.

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

14 years agoDon't expand tabs when computing the offset from the code-completion column
Douglas Gregor [Tue, 8 Dec 2009 21:45:46 +0000 (21:45 +0000)]
Don't expand tabs when computing the offset from the code-completion column

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

14 years agoDon't use MS extensions in this test, we expect header include markers.
Daniel Dunbar [Tue, 8 Dec 2009 21:40:02 +0000 (21:40 +0000)]
Don't use MS extensions in this test, we expect header include markers.

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

14 years agoPick up MB_LEN_MAX as defined by the system <limits.h>, when it's provided there
Douglas Gregor [Tue, 8 Dec 2009 21:35:00 +0000 (21:35 +0000)]
Pick up MB_LEN_MAX as defined by the system <limits.h>, when it's provided there

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

14 years agoUpdate CGExprConstant for change to emit padding values as undef.
Daniel Dunbar [Tue, 8 Dec 2009 21:12:32 +0000 (21:12 +0000)]
Update CGExprConstant for change to emit padding values as undef.
 - This fixes 2003-05-21-BitfieldHandling.

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

14 years agoSwitch this test to use clang-cc.
Daniel Dunbar [Tue, 8 Dec 2009 21:12:25 +0000 (21:12 +0000)]
Switch this test to use clang-cc.

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

14 years agoPatch to allow matching 0 with an objective-c pointer type
Fariborz Jahanian [Tue, 8 Dec 2009 20:04:24 +0000 (20:04 +0000)]
Patch to allow matching 0 with an objective-c pointer type
in objective-c++ mode. Fixes radar 7443165

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

14 years agoUnbreak clang-cc handling of -msoft-float / -mfloat-abi=, which I borked.
Daniel Dunbar [Tue, 8 Dec 2009 19:49:51 +0000 (19:49 +0000)]
Unbreak clang-cc handling of -msoft-float / -mfloat-abi=, which I borked.

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

14 years agoUse clang-cc in this test.
Daniel Dunbar [Tue, 8 Dec 2009 19:49:40 +0000 (19:49 +0000)]
Use clang-cc in this test.

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

14 years agoPatch to allow cstyle cast of objective-c pointers in objective-c++
Fariborz Jahanian [Tue, 8 Dec 2009 19:22:33 +0000 (19:22 +0000)]
Patch to allow cstyle cast of objective-c pointers in objective-c++
mode as they are pervasive.

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

14 years agoRefactor objective-c pointer assignment compatibility logic. No
Fariborz Jahanian [Tue, 8 Dec 2009 18:24:49 +0000 (18:24 +0000)]
Refactor objective-c pointer assignment compatibility logic. No
intended functionality change.

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