]>
granicus.if.org Git - clang/log
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
Daniel Dunbar [Sat, 1 Nov 2008 01:14:36 +0000 (01:14 +0000)]
Add recent timing results to web page.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58542
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 31 Oct 2008 20:25:05 +0000 (20:25 +0000)]
Semantic checking of constructor declarations and classification of default/copy constructors
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58538
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 31 Oct 2008 16:23:19 +0000 (16:23 +0000)]
Implement basic support for converting constructors in user-defined
conversions.
Notes:
- Overload resolution for converting constructors need to prohibit
user-defined conversions (hence, the test isn't -verify safe yet).
- We still use hacks for conversions from a class type to itself.
This will be the case until we start implicitly declaring the appropriate
special member functions. (That's next on my list)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58513
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 31 Oct 2008 16:05:19 +0000 (16:05 +0000)]
Fix a bug that was introduced in 58501. Ideally I think we should force all targets to set these values and not have defaults.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58511
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 31 Oct 2008 15:33:11 +0000 (15:33 +0000)]
Comment out invalid assertion. I'm leaving it in the code for now as a reminder to produce a test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58510
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Fri, 31 Oct 2008 14:43:28 +0000 (14:43 +0000)]
Implement semantic checking of static_cast and dynamic_cast.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58509
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 31 Oct 2008 11:02:48 +0000 (11:02 +0000)]
Simplify interface. We can get canonical type from the base region directly. No need for an extra type argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58507
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 31 Oct 2008 10:53:01 +0000 (10:53 +0000)]
Implement struct initialization for SCA.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58506
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 31 Oct 2008 10:24:47 +0000 (10:24 +0000)]
Implement array initialization for SCA.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58504
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Fri, 31 Oct 2008 10:24:31 +0000 (10:24 +0000)]
Fixed build warning. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58503
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 31 Oct 2008 10:23:14 +0000 (10:23 +0000)]
Add test code for array initialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58502
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Fri, 31 Oct 2008 09:52:39 +0000 (09:52 +0000)]
Made the mechanism of defining preprocessor defs for maxint, ptrdiff_t, wchar
etc more generic. For some targets, long may not be equal to pointer size. For
example: PIC16 has int as i16, ptr as i16 but long as i32.
Also fixed a few build warnings in assert() functions in CFRefCount.cpp,
CGDecl.cpp, SemaDeclCXX.cpp and ParseDeclCXX.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58501
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 31 Oct 2008 09:34:21 +0000 (09:34 +0000)]
Turn off module verification in Release-Asserts builds.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58500
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 31 Oct 2008 09:07:45 +0000 (09:07 +0000)]
Add support for parsing and representing C++ constructor declarations.
Notes:
- Constructors are never found by name lookup, so they'll never get
pushed into any scope. Instead, they are stored as an
OverloadedFunctionDecl in CXXRecordDecl for easy overloading.
- There's a new action isCurrentClassName that determines whether an
identifier is the name of the innermost class currently being defined;
we use this to identify the declarator-id grammar rule that refers to
a type-name.
- MinimalAction does *not* support parsing constructors.
- We now handle virtual and explicit function specifiers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58499
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 31 Oct 2008 08:56:51 +0000 (08:56 +0000)]
"One" line fix for -parse-noop failure, "id" and several other things
were being treated as type names for non-Objective-C files.
- Other lines are just because MinimalAction didn't have access to
the LangOptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58498
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 31 Oct 2008 08:12:03 +0000 (08:12 +0000)]
Debug info: Bug fix, function types should always include the return
type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58497
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 31 Oct 2008 08:10:01 +0000 (08:10 +0000)]
Implement BindStruct and fix a bug in RetriveStruct.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58496
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 31 Oct 2008 07:26:14 +0000 (07:26 +0000)]
Fix 80-col violations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58495
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 31 Oct 2008 07:16:08 +0000 (07:16 +0000)]
Implement load from struct region. Instead of returning an UnknownVal(), we create a CompoundVal by loading from each field of the struct.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58494
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 31 Oct 2008 06:30:35 +0000 (06:30 +0000)]
Make CompoundLiteralRegion a subclass of TypedRegiion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58493
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 31 Oct 2008 06:05:32 +0000 (06:05 +0000)]
Add a tentative assertion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58492
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 31 Oct 2008 05:48:42 +0000 (05:48 +0000)]
On Mac OS X, use TMPDIR as the default location to place analysis results. This is a more secure location for such files, and addresses <rdar://problem/
6334220 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58491
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 31 Oct 2008 04:04:54 +0000 (04:04 +0000)]
Quick fix for PR2950, infinite loop generating debug info for
recursive types.
- Style will be clean up in further patches.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58490
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 31 Oct 2008 03:54:29 +0000 (03:54 +0000)]
Formatting tweaks.
- No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58488
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 31 Oct 2008 03:01:26 +0000 (03:01 +0000)]
Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58487
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 31 Oct 2008 00:20:13 +0000 (00:20 +0000)]
Added missing 'expected-warning'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58481
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 31 Oct 2008 00:19:42 +0000 (00:19 +0000)]
Enhance compound literal test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58480
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 31 Oct 2008 00:18:30 +0000 (00:18 +0000)]
Use llvm::raw_string_ostream instead of std::ostringstream.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58479
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 31 Oct 2008 00:13:20 +0000 (00:13 +0000)]
Enhance path-sensitive return-of-stack-address check to print out the line number of a compound literal (whose address is being returned) instead of printing out the hex representation of the pointer address of the CompoundLiteralExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58478
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 31 Oct 2008 00:04:54 +0000 (00:04 +0000)]
Add accessor method to CompoundLiteralRegion to retrieve the CompoundLiteralExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58476
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 30 Oct 2008 23:41:37 +0000 (23:41 +0000)]
Updated checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58473
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 30 Oct 2008 23:17:05 +0000 (23:17 +0000)]
Add missing "expected warning".
Add compound literal with empty initializer (just to test the analyzer handles it).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58470
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 30 Oct 2008 23:14:58 +0000 (23:14 +0000)]
Extend "followsFundamentalRule" to ignore prefix '_' characters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58469
91177308 -0d34-0410-b5e6-
96231b3b80d8