]> granicus.if.org Git - clang/log
clang
15 years agodon't preserve names on IR instructions. This matches llvm-gcc's behavior and
Chris Lattner [Mon, 10 Nov 2008 06:31:46 +0000 (06:31 +0000)]
don't preserve names on IR instructions.  This matches llvm-gcc's behavior and
speeds up the compiler by ~8% at -emit-llvm -O0.

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

15 years agosort files add a missed header to the project.
Chris Lattner [Mon, 10 Nov 2008 06:31:19 +0000 (06:31 +0000)]
sort files add a missed header to the project.

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

15 years agoFix even more bugs in debug info support:
Chris Lattner [Mon, 10 Nov 2008 06:10:01 +0000 (06:10 +0000)]
Fix even more bugs in debug info support:
1. emit proper debug info for forward decls of structs.
2. emit DW_TAG_member nodes around members of a field like llvm-gcc does.

This slows down debug info generation, but is required for correctness.

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

15 years agoreimplement debug info generation in terms of DebugInfo.h instead of
Chris Lattner [Mon, 10 Nov 2008 06:08:34 +0000 (06:08 +0000)]
reimplement debug info generation in terms of DebugInfo.h instead of
using MachineModuleInfo.  This runs at about the same speed as the old
code, but fixes a bunch of bugs and is simpler and shorter.

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

15 years agoPrint integer value instead of raw pointer. This is a hack to be fixed by migrating...
Zhongxing Xu [Mon, 10 Nov 2008 05:00:06 +0000 (05:00 +0000)]
Print integer value instead of raw pointer. This is a hack to be fixed by migrating the output in analyzer to llvm::raw_ostream.

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

15 years agosilence a warning from gcc.
Chris Lattner [Mon, 10 Nov 2008 03:00:37 +0000 (03:00 +0000)]
silence a warning from gcc.

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

15 years agoIntroduce ScopedDecl::getLexicalDeclContext() which is different from ScopedDecl...
Argyrios Kyrtzidis [Sun, 9 Nov 2008 23:41:00 +0000 (23:41 +0000)]
Introduce ScopedDecl::getLexicalDeclContext() which is different from ScopedDecl::getDeclContext() when there are nested-names.
e.g.:
  namespace A {
    void f(); // SemanticDC (getDeclContext) == LexicalDC (getLexicalDeclContext) == 'namespace A'
  }
  void A::f(); // SemanticDC == namespace 'A'
               // LexicalDC == global namespace

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

15 years agoWhen a tag has nested-name ('struct foo::bar'), use not 'CurContext' but the context...
Argyrios Kyrtzidis [Sun, 9 Nov 2008 22:53:32 +0000 (22:53 +0000)]
When a tag has nested-name ('struct foo::bar'), use not 'CurContext' but the context of the nested-name ('foo::').

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

15 years agoSimplify handling of nested-names in tags ('struct foo::bar').
Argyrios Kyrtzidis [Sun, 9 Nov 2008 22:09:58 +0000 (22:09 +0000)]
Simplify handling of nested-names in tags ('struct foo::bar').
-Use more of the non nested-name code path.
-Also use the ActOnTagStruct code path.

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

15 years agoSupport named operands in inline asm statements.
Anders Carlsson [Sun, 9 Nov 2008 18:54:14 +0000 (18:54 +0000)]
Support named operands in inline asm statements.

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

15 years agoUpdate C++ status: class support improved due to nested name parsing.
Sebastian Redl [Sun, 9 Nov 2008 11:32:32 +0000 (11:32 +0000)]
Update C++ status: class support improved due to nested name parsing.

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

15 years agoImplement Sema support for C++ nested-name-specifiers.
Argyrios Kyrtzidis [Sat, 8 Nov 2008 17:17:31 +0000 (17:17 +0000)]
Implement Sema support for C++ nested-name-specifiers.

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

15 years agoSilence a GCC member initialization order warning.
Argyrios Kyrtzidis [Sat, 8 Nov 2008 16:47:38 +0000 (16:47 +0000)]
Silence a GCC member initialization order warning.

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

15 years agoImplement support for C++ nested-name-specifiers ('foo::bar::x') in the Parser side.
Argyrios Kyrtzidis [Sat, 8 Nov 2008 16:45:02 +0000 (16:45 +0000)]
Implement support for C++ nested-name-specifiers ('foo::bar::x') in the Parser side.
No Sema functionality change, just the signatures of the Action/Sema methods.

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

15 years agoIntroduce annotation tokens, a special kind of token, created and used only by the...
Argyrios Kyrtzidis [Sat, 8 Nov 2008 16:17:04 +0000 (16:17 +0000)]
Introduce annotation tokens, a special kind of token, created and used only by the parser to replace a group of tokens with a single token encoding semantic information.
Will be fully utilized later for C++ nested-name-specifiers.

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

15 years agoUpdate C++ status to reflect parser capabilities for chapter 9 (classes). Slightly...
Sebastian Redl [Sat, 8 Nov 2008 15:40:37 +0000 (15:40 +0000)]
Update C++ status to reflect parser capabilities for chapter 9 (classes). Slightly extend the class parser test.

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

15 years agoUpdate C++ status: dynamic_cast is sema-complete.
Sebastian Redl [Sat, 8 Nov 2008 14:43:13 +0000 (14:43 +0000)]
Update C++ status: dynamic_cast is sema-complete.

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

15 years agoMove named cast helpers out of Sema, as Chris requested. This requirse making a few...
Sebastian Redl [Sat, 8 Nov 2008 13:00:26 +0000 (13:00 +0000)]
Move named cast helpers out of Sema, as Chris requested. This requirse making a few functions public that weren't before.

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

15 years agoRevert r58880, it breaks test/SemaCXX/constructor.cpp
Argyrios Kyrtzidis [Sat, 8 Nov 2008 12:02:25 +0000 (12:02 +0000)]
Revert r58880, it breaks test/SemaCXX/constructor.cpp

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

15 years agoUse only one constructor for CXXMethodDecl. Keep initialization stuff into one place.
Argyrios Kyrtzidis [Sat, 8 Nov 2008 11:24:06 +0000 (11:24 +0000)]
Use only one constructor for CXXMethodDecl. Keep initialization stuff into one place.

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

15 years agoAvoid redundant cast<>s / simplify type dispatch.
Daniel Dunbar [Sat, 8 Nov 2008 06:12:46 +0000 (06:12 +0000)]
Avoid redundant cast<>s / simplify type dispatch.

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

15 years agoSupport getTypeInfo, getTypeAlign, getTypeSize on const Type*s.
Daniel Dunbar [Sat, 8 Nov 2008 05:48:37 +0000 (05:48 +0000)]
Support getTypeInfo, getTypeAlign, getTypeSize on const Type*s.
 - Size/align are not effected by CVR qualifiers.

Support getCanonicalType: const Type* -> const Type*.

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

15 years ago"Fix" PR3021, don't crash on generating record types when we can't
Daniel Dunbar [Sat, 8 Nov 2008 04:42:29 +0000 (04:42 +0000)]
"Fix" PR3021, don't crash on generating record types when we can't
generate the type of a member.

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

15 years agoSilence a gcc warning.
Daniel Dunbar [Sat, 8 Nov 2008 04:28:37 +0000 (04:28 +0000)]
Silence a gcc warning.

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

15 years agoAdd a boilerplate for out-of-bound array checking. This has no real function currently.
Zhongxing Xu [Sat, 8 Nov 2008 03:45:42 +0000 (03:45 +0000)]
Add a boilerplate for out-of-bound array checking. This has no real function currently.

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

15 years agoIn a declarator, consider an identifier a constructor only if it is followed by '('.
Argyrios Kyrtzidis [Sat, 8 Nov 2008 01:09:16 +0000 (01:09 +0000)]
In a declarator, consider an identifier a constructor only if it is followed by '('.

Previously:

class C {
  int C;  // Declarator::SetConstructor was called here.
};

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

15 years agoupdate post-build step
Ted Kremenek [Sat, 8 Nov 2008 01:02:26 +0000 (01:02 +0000)]
update post-build step

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

15 years agoGreatly improve static_cast diagnostics
Sebastian Redl [Fri, 7 Nov 2008 23:29:29 +0000 (23:29 +0000)]
Greatly improve static_cast diagnostics

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

15 years agoInitial, partially-baked support for implicit user-defined conversions by conversion...
Douglas Gregor [Fri, 7 Nov 2008 22:36:19 +0000 (22:36 +0000)]
Initial, partially-baked support for implicit user-defined conversions by conversion functions

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

15 years agoUse css style instead of hard coded color in cxx_status. No visible change.
Cedric Venet [Fri, 7 Nov 2008 22:24:44 +0000 (22:24 +0000)]
Use css style instead of hard coded color in cxx_status. No visible change.

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

15 years agoChanges in preparation for nested-name-specifiers.
Argyrios Kyrtzidis [Fri, 7 Nov 2008 22:02:30 +0000 (22:02 +0000)]
Changes in preparation for nested-name-specifiers.

-When parsing declarators, don't depend on "CurScope->isCXXClassScope() == true" for constructors/destructors
-For C++ member declarations, don't depend on "Declarator.getContext() == Declarator::MemberContext"

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

15 years agoUpdated checker build.
Ted Kremenek [Fri, 7 Nov 2008 20:55:59 +0000 (20:55 +0000)]
Updated checker build.

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

15 years agoUpdate C++ status
Douglas Gregor [Fri, 7 Nov 2008 20:16:04 +0000 (20:16 +0000)]
Update C++ status

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

15 years agoParsing, ASTs, and semantic analysis for the declaration of conversion
Douglas Gregor [Fri, 7 Nov 2008 20:08:42 +0000 (20:08 +0000)]
Parsing, ASTs, and semantic analysis for the declaration of conversion
functions in C++, e.g.,

  struct X {
    operator bool() const;
  };

Note that these conversions don't actually do anything, since we don't
yet have the ability to use them for implicit or explicit conversions.

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

15 years agoAssert that Parser::MaybeParseOperatorFunctionId is called when token is kw_operator...
Argyrios Kyrtzidis [Fri, 7 Nov 2008 15:54:02 +0000 (15:54 +0000)]
Assert that Parser::MaybeParseOperatorFunctionId is called when token is kw_operator, and replace ExpectAndConsume for the 'operator' token with a ConsumeToken.

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

15 years agoSeparate the parsing of type-specifiers from other declaration specifiers, so that...
Douglas Gregor [Fri, 7 Nov 2008 15:42:26 +0000 (15:42 +0000)]
Separate the parsing of type-specifiers from other declaration specifiers, so that we can parse a C++ type-specifier-seq

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

15 years agoinclude alloca.h instead of malloc.h. If this doesn't work for everyone we can just...
Anders Carlsson [Fri, 7 Nov 2008 15:41:33 +0000 (15:41 +0000)]
include alloca.h instead of malloc.h. If this doesn't work for everyone we can just declare alloca directly in the file.

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

15 years agoAppend the test runs with '&&'.
Argyrios Kyrtzidis [Fri, 7 Nov 2008 14:28:18 +0000 (14:28 +0000)]
Append the test runs with '&&'.

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

15 years agoProperly deserialize ParamInfo of FunctionDecl.
Argyrios Kyrtzidis [Fri, 7 Nov 2008 14:22:23 +0000 (14:22 +0000)]
Properly deserialize ParamInfo of FunctionDecl.

When allocating an array for ParamInfo, the "decl->getNumParams()" call was used, but this will return 0 since it checks ParamInfo (which isn't yet defined and is null).
The result was that ParamInfo got an array of zero length to hold the ParmVarDecls.

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

15 years agoBring in 'alloca' for the Analysis/stack-addr-ps.c test case.
Argyrios Kyrtzidis [Fri, 7 Nov 2008 14:00:25 +0000 (14:00 +0000)]
Bring in 'alloca' for the Analysis/stack-addr-ps.c test case.

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

15 years agoAdd simple get method.
Zhongxing Xu [Fri, 7 Nov 2008 13:13:41 +0000 (13:13 +0000)]
Add simple get method.

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

15 years agoJoin two lines.
Zhongxing Xu [Fri, 7 Nov 2008 13:05:39 +0000 (13:05 +0000)]
Join two lines.

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

15 years agoFix crash caused by this:
Argyrios Kyrtzidis [Fri, 7 Nov 2008 13:01:22 +0000 (13:01 +0000)]
Fix crash caused by this:

void f() {
   int +; // crash here
}

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

15 years agoShut off an unsigned/signed comparison warning for GCC.
Argyrios Kyrtzidis [Fri, 7 Nov 2008 12:15:16 +0000 (12:15 +0000)]
Shut off an unsigned/signed comparison warning for GCC.

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

15 years agoFinish the implementation of VisitCompoundLiteralExpr. As VisitInitListExpr is
Zhongxing Xu [Fri, 7 Nov 2008 10:38:33 +0000 (10:38 +0000)]
Finish the implementation of VisitCompoundLiteralExpr. As VisitInitListExpr is
available, things get much simplified.

One addition is that CompoundLiteralExpr can appear both in rvalue and lvalue
context.

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

15 years agoMake the assertion real.
Zhongxing Xu [Fri, 7 Nov 2008 08:57:30 +0000 (08:57 +0000)]
Make the assertion real.

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

15 years agoPatch by Nikita Zhuk: Add TranslationUnitActions to AnalysisConsumer.
Ted Kremenek [Fri, 7 Nov 2008 02:09:25 +0000 (02:09 +0000)]
Patch by Nikita Zhuk: Add TranslationUnitActions to AnalysisConsumer.

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

15 years agoInitial, rudimentary implementation of operator overloading for binary
Douglas Gregor [Thu, 6 Nov 2008 23:29:22 +0000 (23:29 +0000)]
Initial, rudimentary implementation of operator overloading for binary
operators. For example, one can now write "x + y" where x or y is a
class or enumeration type, and Clang will perform overload resolution
for "+" based on the overloaded operators it finds.

The other kinds of overloadable operators in C++ will follow this same
approach.

Three major issues remain:
  1) We don't find member operators
  2) Since we don't have user-defined conversion operators, we can't
  call any of the built-in overloaded operators in C++ [over.built].
  3) Once we've done the semantic checks, we drop the overloaded
  operator on the floor; it doesn't get into the AST at all.

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

15 years agoParsing, ASTs, and semantic analysis for the declaration of overloaded
Douglas Gregor [Thu, 6 Nov 2008 22:13:31 +0000 (22:13 +0000)]
Parsing, ASTs, and semantic analysis for the declaration of overloaded
operators in C++. Overloaded operators can be called directly via
their operator-function-ids, e.g., "operator+(foo, bar)", but we don't
yet implement the semantics of operator overloading to handle, e.g.,
"foo + bar".

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

15 years agoReclaim some bits in IdentifierInfo, for later use as overloaded operator names.
Douglas Gregor [Thu, 6 Nov 2008 16:32:23 +0000 (16:32 +0000)]
Reclaim some bits in IdentifierInfo, for later use as overloaded operator names.

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

15 years agoSema-check virtual declarations. Complete dynamic_cast checking.
Sebastian Redl [Thu, 6 Nov 2008 15:59:35 +0000 (15:59 +0000)]
Sema-check virtual declarations. Complete dynamic_cast checking.

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

15 years agoAdd the remaining C++0x keywords
Douglas Gregor [Thu, 6 Nov 2008 15:17:27 +0000 (15:17 +0000)]
Add the remaining C++0x keywords

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

15 years agoUpdate VC++ proj.
Steve Naroff [Thu, 6 Nov 2008 06:24:22 +0000 (06:24 +0000)]
Update VC++ proj.

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

15 years agoBring back RegionExtent classes.
Zhongxing Xu [Thu, 6 Nov 2008 04:55:21 +0000 (04:55 +0000)]
Bring back RegionExtent classes.

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

15 years agoUpdated checker build.
Ted Kremenek [Wed, 5 Nov 2008 22:47:25 +0000 (22:47 +0000)]
Updated checker build.

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

15 years agoAdd a test case for CFMakeCollectable.
Ted Kremenek [Wed, 5 Nov 2008 22:17:39 +0000 (22:17 +0000)]
Add a test case for CFMakeCollectable.

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

15 years agoFix regression with handling of CFMakeCollectable.
Ted Kremenek [Wed, 5 Nov 2008 22:17:20 +0000 (22:17 +0000)]
Fix regression with handling of CFMakeCollectable.

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

15 years agoImprove assert messages.
Sebastian Redl [Wed, 5 Nov 2008 22:15:14 +0000 (22:15 +0000)]
Improve assert messages.

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

15 years agoMove named cast sema functions to their own file.
Sebastian Redl [Wed, 5 Nov 2008 21:50:06 +0000 (21:50 +0000)]
Move named cast sema functions to their own file.

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

15 years agoParsing, representation, and preliminary semantic analysis of destructors.
Douglas Gregor [Wed, 5 Nov 2008 20:51:48 +0000 (20:51 +0000)]
Parsing, representation, and preliminary semantic analysis of destructors.

Implicit declaration of destructors (when necessary).

Extended Declarator to store information about parsed constructors
and destructors; this will be extended to deal with declarators that
name overloaded operators (e.g., "operator +") and user-defined
conversion operators (e.g., "operator int").

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

15 years agoAnalysisManager can now be used to for analyses over TranslationUnits.
Ted Kremenek [Wed, 5 Nov 2008 19:05:06 +0000 (19:05 +0000)]
AnalysisManager can now be used to for analyses over TranslationUnits.

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

15 years agoA small error message improvement and some comment cleanup for static_cast.
Sebastian Redl [Wed, 5 Nov 2008 17:54:26 +0000 (17:54 +0000)]
A small error message improvement and some comment cleanup for static_cast.

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

15 years agoinitXXX methods can return owned objects
Ted Kremenek [Wed, 5 Nov 2008 16:54:44 +0000 (16:54 +0000)]
initXXX methods can return owned objects

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

15 years agoKeep track of whether a C++ class is an aggregate. Don't allow initialization of...
Douglas Gregor [Wed, 5 Nov 2008 16:20:31 +0000 (16:20 +0000)]
Keep track of whether a C++ class is an aggregate. Don't allow initialization of non-aggregates with initializer lists.

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

15 years agoImplement C++ copy-initialization for declarations. There is now some
Douglas Gregor [Wed, 5 Nov 2008 15:29:30 +0000 (15:29 +0000)]
Implement C++ copy-initialization for declarations. There is now some
duplication in the handling of copy-initialization by constructor,
which occurs both for initialization of a declaration and for
overloading. The initialization code is due for some refactoring.

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

15 years agoInitial implementation of parsing, semantic analysis, and AST-building
Douglas Gregor [Wed, 5 Nov 2008 04:29:56 +0000 (04:29 +0000)]
Initial implementation of parsing, semantic analysis, and AST-building
for constructor initializations, e.g.,

  class A { };
  class B : public A {
    int m;
  public:
    B() : A(), m(17) { };
  };

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

15 years agoUpdate CMakeLists.txt
Cedric Venet [Tue, 4 Nov 2008 20:31:17 +0000 (20:31 +0000)]
Update CMakeLists.txt

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

15 years agoRemove stray character.
Daniel Dunbar [Tue, 4 Nov 2008 18:44:31 +0000 (18:44 +0000)]
Remove stray character.

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

15 years agoUpdate Xcode project.
Ted Kremenek [Tue, 4 Nov 2008 18:39:58 +0000 (18:39 +0000)]
Update Xcode project.

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

15 years agoMake it an error if an Objective-C declaration is not in the global scope.
Anders Carlsson [Tue, 4 Nov 2008 16:57:32 +0000 (16:57 +0000)]
Make it an error if an Objective-C declaration is not in the global scope.

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

15 years agoLinkageSpecDecl is c++ specific, move it to DeclCXX
Chris Lattner [Tue, 4 Nov 2008 16:51:42 +0000 (16:51 +0000)]
LinkageSpecDecl is c++ specific, move it to DeclCXX

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

15 years agoSome cleanup of the cast checkers. Don't canonicalize types when not needed. Use...
Sebastian Redl [Tue, 4 Nov 2008 15:59:10 +0000 (15:59 +0000)]
Some cleanup of the cast checkers. Don't canonicalize types when not needed. Use distinct diagnostics for distinct errors.

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

15 years agoFine-grained C++ status page
Douglas Gregor [Tue, 4 Nov 2008 15:52:45 +0000 (15:52 +0000)]
Fine-grained C++ status page

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

15 years agoAdd a new expression class, ObjCSuperExpr, to handle the Objective-C 'super'. Remove...
Douglas Gregor [Tue, 4 Nov 2008 14:56:14 +0000 (14:56 +0000)]
Add a new expression class, ObjCSuperExpr, to handle the Objective-C 'super'. Remove ObjCThis from PredefinedExpr

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

15 years agoCreate a new expression class, CXXThisExpr, to handle the C++ 'this' primary expressi...
Douglas Gregor [Tue, 4 Nov 2008 14:32:21 +0000 (14:32 +0000)]
Create a new expression class, CXXThisExpr, to handle the C++ 'this' primary expression. Remove CXXThis from PredefinedExpr

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

15 years agoNow that we have copy initialization support, use it for checking the default arguments
Douglas Gregor [Tue, 4 Nov 2008 13:57:51 +0000 (13:57 +0000)]
Now that we have copy initialization support, use it for checking the default arguments

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

15 years agoDiagnose use of 'this' in a C++ default argument. Thanks to Eli for correcting my...
Douglas Gregor [Tue, 4 Nov 2008 13:41:56 +0000 (13:41 +0000)]
Diagnose use of 'this' in a C++ default argument. Thanks to Eli for correcting my bogus assertion about it already being handled

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

15 years agoTrivial style fix.
Sebastian Redl [Tue, 4 Nov 2008 11:45:54 +0000 (11:45 +0000)]
Trivial style fix.

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

15 years ago#define NULL as 0 when compiling as C++. This fixes the carbon.cpp and cocoa.mm test...
Anders Carlsson [Tue, 4 Nov 2008 06:53:14 +0000 (06:53 +0000)]
#define NULL as 0 when compiling as C++. This fixes the carbon.cpp and cocoa.mm test failures.

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

15 years agoImplement lowering of va_arg in clang directly. (This is 32-bit X86 only for now).
Anders Carlsson [Tue, 4 Nov 2008 05:30:00 +0000 (05:30 +0000)]
Implement lowering of va_arg in clang directly. (This is 32-bit X86 only for now).

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

15 years agoFix bug in va_copy
Anders Carlsson [Tue, 4 Nov 2008 05:29:05 +0000 (05:29 +0000)]
Fix bug in va_copy

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

15 years agoUpdated checker build.
Ted Kremenek [Tue, 4 Nov 2008 01:24:32 +0000 (01:24 +0000)]
Updated checker build.

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

15 years agoHandle prefix '_' that may appear in front of the name of 'Release' functions
Ted Kremenek [Tue, 4 Nov 2008 00:36:12 +0000 (00:36 +0000)]
Handle prefix '_' that may appear in front of the name of 'Release' functions

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

15 years agoFix use of uninitialized variable.
Ted Kremenek [Tue, 4 Nov 2008 00:22:12 +0000 (00:22 +0000)]
Fix use of uninitialized variable.

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

15 years agoUpdated checker build.
Ted Kremenek [Tue, 4 Nov 2008 00:03:24 +0000 (00:03 +0000)]
Updated checker build.

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

15 years agoAllow user toggling between plist and html output with scan-build/ccc-analyzer.
Ted Kremenek [Tue, 4 Nov 2008 00:02:53 +0000 (00:02 +0000)]
Allow user toggling between plist and html output with scan-build/ccc-analyzer.

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

15 years agoUpdate VC++ project file.
Steve Naroff [Tue, 4 Nov 2008 00:01:14 +0000 (00:01 +0000)]
Update VC++ project file.

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

15 years agoFix <rdar://problem/6339636> clang ObjC rewriter: Assertion failed: FileID-1 < FileID...
Steve Naroff [Mon, 3 Nov 2008 23:29:32 +0000 (23:29 +0000)]
Fix <rdar://problem/6339636> clang ObjC rewriter: Assertion failed: FileID-1 < FileIDs.size() && "Invalid FileID!", file c:\cygwin\home\Administrator\llvm\tools\clang\include\clang/Basic/SourceManager.h, line 513

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

15 years agoHook up the Plist diagnostic client to the driver.
Ted Kremenek [Mon, 3 Nov 2008 23:18:07 +0000 (23:18 +0000)]
Hook up the Plist diagnostic client to the driver.
Fix Plist output.

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

15 years agoCheck that this cannot be used in a default argument. Happily, it was already implemented
Douglas Gregor [Mon, 3 Nov 2008 22:47:57 +0000 (22:47 +0000)]
Check that this cannot be used in a default argument. Happily, it was already implemented

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

15 years agoAdd path diagnostics client for emitting path reports using Plists.
Ted Kremenek [Mon, 3 Nov 2008 22:33:57 +0000 (22:33 +0000)]
Add path diagnostics client for emitting path reports using Plists.

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

15 years agoRename 'HTMLDiagnostics.h' to 'PathDiagnosticClients.h'
Ted Kremenek [Mon, 3 Nov 2008 22:31:48 +0000 (22:31 +0000)]
Rename 'HTMLDiagnostics.h' to 'PathDiagnosticClients.h'

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

15 years agoImplicit support for direct initialization of objects of class type, e.g.,
Douglas Gregor [Mon, 3 Nov 2008 20:45:27 +0000 (20:45 +0000)]
Implicit support for direct initialization of objects of class type, e.g.,

  X x(5, 7);

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

15 years agoClarify performance experiments description based on feedback from
Daniel Dunbar [Mon, 3 Nov 2008 20:03:58 +0000 (20:03 +0000)]
Clarify performance experiments description based on feedback from
Eric C, thanks!

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

15 years agoStandard conversion sequences now have a CopyConstructor field, to
Douglas Gregor [Mon, 3 Nov 2008 19:09:14 +0000 (19:09 +0000)]
Standard conversion sequences now have a CopyConstructor field, to
cope with the case where a user-defined conversion is actually a copy
construction, and therefore can be compared against other standard
conversion sequences. While I called this a hack before, now I'm
convinced that it's the right way to go.

Compare overloads based on derived-to-base conversions that invoke
copy constructors.

Suppress user-defined conversions when attempting to call a
user-defined conversion.

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

15 years agoAdd implicitly-declared default and copy constructors to C++ classes,
Douglas Gregor [Mon, 3 Nov 2008 17:51:48 +0000 (17:51 +0000)]
Add implicitly-declared default and copy constructors to C++ classes,
when appropriate.

Conversions for class types now make use of copy constructors. I've
replaced the egregious hack allowing class-to-class conversions with a
slightly less egregious hack calling these conversions standard
conversions (for overloading reasons).

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

15 years agoEliminate header dependency ASTContext -> TargetInfo
Douglas Gregor [Mon, 3 Nov 2008 15:57:00 +0000 (15:57 +0000)]
Eliminate header dependency ASTContext -> TargetInfo

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

15 years agoImplement C++ DR 106 and C++ DR 540, both of which deal with
Douglas Gregor [Mon, 3 Nov 2008 15:51:28 +0000 (15:51 +0000)]
Implement C++ DR 106 and C++ DR 540, both of which deal with
reference-collapsing.

Implement diagnostic for formation of a reference to cv void.

Drop cv-qualifiers added to a reference type when the reference type
comes from a typedef.

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

15 years agoConnect ASTContext to TargetInfo when determining the size_t, ptrdiff_t, and wchar_t...
Douglas Gregor [Mon, 3 Nov 2008 14:12:49 +0000 (14:12 +0000)]
Connect ASTContext to TargetInfo when determining the size_t, ptrdiff_t, and wchar_t types. Fixes recent breakage on Linux.

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

15 years agoFix <rdar://problem/6336774> clang block rewriter: Assertion failed: Offset+NumBytes...
Steve Naroff [Mon, 3 Nov 2008 11:20:24 +0000 (11:20 +0000)]
Fix <rdar://problem/6336774> clang block rewriter: Assertion failed: Offset+NumBytes <= size() && "Invalid region to erase!", file c:\cygwin\home\Administrator\llvm\to ols\clang\include\clang/Rewrite/RewriteRope.h, line 219.

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