]>
granicus.if.org Git - clang/log
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Chris Lattner [Mon, 3 Nov 2008 09:28:22 +0000 (09:28 +0000)]
Fix PR3001: if we have an error parsing an initializer, make sure to remove
the designator corresponding to it, otherwise Sema and later parsing will
get confused.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58603
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 3 Nov 2008 09:11:11 +0000 (09:11 +0000)]
privatize some methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58602
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 3 Nov 2008 07:44:16 +0000 (07:44 +0000)]
Simplify the functions HtmlEsape and ShellEscape. We now properly print out the following command line in the HTML output: scan-build gcc -x c /dev/null -c -Dfoo='"string abc"'
Fixes <rdar://problem/
6338651 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58600
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 3 Nov 2008 06:04:23 +0000 (06:04 +0000)]
Add some notes for SCA.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58597
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 3 Nov 2008 05:18:34 +0000 (05:18 +0000)]
Fix 80-col violations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58596
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 3 Nov 2008 04:12:24 +0000 (04:12 +0000)]
- Remove AnonTypedRegion, which is not to be used.
- Prepare AnonPointeeRegioin for later use.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58595
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 2 Nov 2008 22:21:33 +0000 (22:21 +0000)]
Source ranges for named cast diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58570
91177308 -0d34-0410-b5e6-
96231b3b80d8
Cedric Venet [Sun, 2 Nov 2008 16:28:53 +0000 (16:28 +0000)]
Add header files to CMake build solution. It use globing so it doesn't need to be manually maintained, but it won't automatically detect a new header. I think this is a good compromise for the header files, since there presence in the solution is just an help for the user. Moreover, a new header is often introduced with a new cpp source file which need a makefile change, which will regenerate the solution and detect the new header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58566
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Sun, 2 Nov 2008 13:17:44 +0000 (13:17 +0000)]
Add function side-effect test cast.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58565
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Sun, 2 Nov 2008 12:13:30 +0000 (12:13 +0000)]
1. When a pointer to struct is used as an argument, GRSimpleVals::EvalCall()
sets the whole struct to Unknown. Then we cannot assume the V passed to
BindStruct() is always a CompoundVal. When it is an UnknownVal, we call
BindStructToVal(UnknownVal).
2. Change the signature of InitializeStructToUndefined() to BindStructToVal()
to reuse the code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58564
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Sun, 2 Nov 2008 10:58:16 +0000 (10:58 +0000)]
Add defined in if().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58562
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 2 Nov 2008 02:43:55 +0000 (02:43 +0000)]
More fallout from r58501: primary fix is some more corrections to make
the types for size_t and ptrdiff_t more accurate. I think all of these
are correct, but please compare the defines for __PTRDIFF_TYPE__ and
__SIZE_TYPE__ to gcc to double-check; this particularly applies to
those on BSD variants, since I'm not sure what they do here; I assume
here that they're the same as on Linux.
Fixes wchar_t to be "int", not "unsigned int" (which I think is
correct on everything but Windows).
Fixes ptrdiff_t to be "int" rather than "short" on PIC16; "short" is an
somewhat strange choice because it normally gets promoted, and it's not
consistent with the choice for size_t.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58556
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 2 Nov 2008 00:37:31 +0000 (00:37 +0000)]
Add 'alloca' test case for return-of-stack-address checker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58554
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 2 Nov 2008 00:35:25 +0000 (00:35 +0000)]
Enhance return-of-stack-address checker to recognize regions created by alloca().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58553
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 2 Nov 2008 00:35:01 +0000 (00:35 +0000)]
Add transfer function logic for alloca().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58552
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 2 Nov 2008 00:34:33 +0000 (00:34 +0000)]
Added AllocaRegion, which represents regions created by calls to alloca().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58551
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 2 Nov 2008 00:33:58 +0000 (00:33 +0000)]
Fixed a horrible bug in HTMLDiagnostics.cpp where bugs referencing source ranges that occur within macros would not be emitted at all.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58550
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 1 Nov 2008 01:53:16 +0000 (01:53 +0000)]
Move IRBuilder type definition to common file.
- No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58546
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 1 Nov 2008 01:46:51 +0000 (01:46 +0000)]
minor tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58545
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 1 Nov 2008 01:24:31 +0000 (01:24 +0000)]
Grammar tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58544
91177308 -0d34-0410-b5e6-
96231b3b80d8