]> granicus.if.org Git - clang/log
clang
15 years agoGet rid of some code that should be unnecessary.
Eli Friedman [Sun, 25 Jan 2009 02:10:46 +0000 (02:10 +0000)]
Get rid of some code that should be unnecessary.

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

15 years agoMake the constant folder aware of
Eli Friedman [Sun, 25 Jan 2009 01:54:01 +0000 (01:54 +0000)]
Make the constant folder aware of
__builtin___CFStringMakeConstantString.  (We get into trouble in
GenerateStaticBlockVarDecl if the constant folder isn't accurate.)

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

15 years agoFix the address of a label to be properly considered and emitted as a
Eli Friedman [Sun, 25 Jan 2009 01:21:06 +0000 (01:21 +0000)]
Fix the address of a label to be properly considered and emitted as a
constant.

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

15 years agoFix for PR2100: merge types for variables.
Eli Friedman [Sat, 24 Jan 2009 23:49:55 +0000 (23:49 +0000)]
Fix for PR2100: merge types for variables.

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

15 years agoCorrect test; sorry for any inconvenience.
Eli Friedman [Sat, 24 Jan 2009 23:44:26 +0000 (23:44 +0000)]
Correct test; sorry for any inconvenience.

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

15 years agoCompute instaceStart/instanceSize fields of the class_ro_t meta-data
Fariborz Jahanian [Sat, 24 Jan 2009 23:43:01 +0000 (23:43 +0000)]
Compute instaceStart/instanceSize fields of the class_ro_t meta-data
for objc2's non-fragile abi.

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

15 years agoMake tentative parsing of pointer-to-member decls work, and fix other stuff pointed...
Sebastian Redl [Sat, 24 Jan 2009 23:29:36 +0000 (23:29 +0000)]
Make tentative parsing of pointer-to-member decls work, and fix other stuff pointed out by Doug.

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

15 years agoPR3062: statement expressions should be illegal at file scope. I don't
Eli Friedman [Sat, 24 Jan 2009 23:09:00 +0000 (23:09 +0000)]
PR3062: statement expressions should be illegal at file scope.  I don't
think this has any significant effects at the moment, but it could
matter if we start constant-folding statement expressions like gcc does.

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

15 years agoFix for PR2910: implement CodeGen for non-constant offsetof.
Eli Friedman [Sat, 24 Jan 2009 22:38:55 +0000 (22:38 +0000)]
Fix for PR2910: implement CodeGen for non-constant offsetof.

Note that there are still other issues in this area; see PR3396.

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

15 years agoRefactor sizeof handling to use constant folding logic for constant
Eli Friedman [Sat, 24 Jan 2009 22:19:05 +0000 (22:19 +0000)]
Refactor sizeof handling to use constant folding logic for constant
sizeof expressions.

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

15 years agoadd initial support for the gcc "alignof(decl) is the alignment of the decl
Chris Lattner [Sat, 24 Jan 2009 21:53:27 +0000 (21:53 +0000)]
add initial support for the gcc "alignof(decl) is the alignment of the decl
not the type" semantics.  This can definitely be improved, but is better than
what we had.

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

15 years agoUndo accidental disabling of smart pointers.
Sebastian Redl [Sat, 24 Jan 2009 21:36:33 +0000 (21:36 +0000)]
Undo accidental disabling of smart pointers.

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

15 years agoImplement C99 6.5.3.4p1, rejecting sizeof(bitfield)
Chris Lattner [Sat, 24 Jan 2009 21:29:22 +0000 (21:29 +0000)]
Implement C99 6.5.3.4p1, rejecting sizeof(bitfield)

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

15 years agoPatch to build class meta-data for each implementation
Fariborz Jahanian [Sat, 24 Jan 2009 21:21:53 +0000 (21:21 +0000)]
Patch to build class meta-data for each implementation
of class in objc2's nonfragile abi.

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

15 years agoAdd support for declaring pointers to members.
Sebastian Redl [Sat, 24 Jan 2009 21:16:55 +0000 (21:16 +0000)]
Add support for declaring pointers to members.
Add serialization support for ReferenceType.

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

15 years agoremove a bunch of alignment handling code out of CGExprScalar, since
Chris Lattner [Sat, 24 Jan 2009 21:09:45 +0000 (21:09 +0000)]
remove a bunch of alignment handling code out of CGExprScalar, since
alignment must always be a constant.  Just let the constant folder
do it.

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

15 years agoImprove handling of alignof. alignof(VLA) now works properly for example.
Chris Lattner [Sat, 24 Jan 2009 21:09:06 +0000 (21:09 +0000)]
Improve handling of alignof.  alignof(VLA) now works properly for example.

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

15 years agofix some const-correctness issues.
Chris Lattner [Sat, 24 Jan 2009 21:08:33 +0000 (21:08 +0000)]
fix some const-correctness issues.

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

15 years agoremove dead code.
Chris Lattner [Sat, 24 Jan 2009 20:24:49 +0000 (20:24 +0000)]
remove dead code.

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

15 years agoThis patch builds the meta-class object for each
Fariborz Jahanian [Sat, 24 Jan 2009 20:21:50 +0000 (20:21 +0000)]
This patch builds the meta-class object for each
implemented class in objc2's nonfrigile abi.

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

15 years agoFix PR3386 by handling GCC's rules for alignof, which are substantially
Chris Lattner [Sat, 24 Jan 2009 20:17:12 +0000 (20:17 +0000)]
Fix PR3386 by handling GCC's rules for alignof, which are substantially
different than those for sizeof.  Reject alignof(bitfield) like gcc does.

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

15 years agofix a fixme, don't leak the expr on error.
Chris Lattner [Sat, 24 Jan 2009 19:49:13 +0000 (19:49 +0000)]
fix a fixme, don't leak the expr on error.

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

15 years agominor formatting changes, no functionality change.
Chris Lattner [Sat, 24 Jan 2009 19:46:37 +0000 (19:46 +0000)]
minor formatting changes, no functionality change.

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

15 years agoFix invalid evaluation of _Complex float (real & imaginary parts had
Daniel Dunbar [Sat, 24 Jan 2009 19:08:01 +0000 (19:08 +0000)]
Fix invalid evaluation of _Complex float (real & imaginary parts had
mismatched semantics).
 - Enforce this in APValue.

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

15 years agoHandle the 'e' constraint. Fixes PR3385
Anders Carlsson [Sat, 24 Jan 2009 18:03:09 +0000 (18:03 +0000)]
Handle the 'e' constraint. Fixes PR3385

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

15 years agoIgnore parens when determining if an expr is a string literal. Fixes PR3382.
Anders Carlsson [Sat, 24 Jan 2009 17:47:50 +0000 (17:47 +0000)]
Ignore parens when determining if an expr is a string literal. Fixes PR3382.

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

15 years agoAdd simple make based harness for running ABI tests.
Daniel Dunbar [Sat, 24 Jan 2009 08:43:22 +0000 (08:43 +0000)]
Add simple make based harness for running ABI tests.

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

15 years agoStart filling in x86_64 ABI implementation.
Daniel Dunbar [Sat, 24 Jan 2009 08:32:22 +0000 (08:32 +0000)]
Start filling in x86_64 ABI implementation.
 - No functionality change, moved behind -use-x86_64-abi option until
   it becomes non-experimental.

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

15 years agoUpdated checker build.
Ted Kremenek [Sat, 24 Jan 2009 08:11:59 +0000 (08:11 +0000)]
Updated checker build.

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

15 years agoFix crash ElementRegion::getRValueType() when the RvalueType of the ArrayRegion is...
Ted Kremenek [Sat, 24 Jan 2009 06:11:36 +0000 (06:11 +0000)]
Fix crash ElementRegion::getRValueType() when the RvalueType of the ArrayRegion is a typedef and not (directly) a pointer.

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

15 years agoMore hacking on static analyzer diagnostics. When emitting summary diagnostics the...
Ted Kremenek [Sat, 24 Jan 2009 00:55:43 +0000 (00:55 +0000)]
More hacking on static analyzer diagnostics.  When emitting summary diagnostics the code paths for diagnostics involving paths or single locations are now unified.  This patch also constifies many arguments/methods that are touched by this logic, leading to a nice overall code cleanup.

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

15 years agoSome very early work for new objc's
Fariborz Jahanian [Fri, 23 Jan 2009 23:53:38 +0000 (23:53 +0000)]
Some very early work for new objc's
meta-data generation.

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

15 years agoFix a small regression in warning about template type parameter redeclarations.
Douglas Gregor [Fri, 23 Jan 2009 22:28:29 +0000 (22:28 +0000)]
Fix a small regression in warning about template type parameter redeclarations.

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

15 years agoOutput summary diagnostic for each bug report.
Ted Kremenek [Fri, 23 Jan 2009 22:22:49 +0000 (22:22 +0000)]
Output summary diagnostic for each bug report.

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

15 years agoMore APSInt appeasement
Douglas Gregor [Fri, 23 Jan 2009 22:22:29 +0000 (22:22 +0000)]
More APSInt appeasement

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

15 years agoMake sure that all NamedDecls have an identifier namespace.
Douglas Gregor [Fri, 23 Jan 2009 21:30:56 +0000 (21:30 +0000)]
Make sure that all NamedDecls have an identifier namespace.
Make sure that we know a call is invalid if we dropped arguments.

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

15 years agoHopefully the last of the APSInt signedness issues with initializers. Fixes PR clang...
Douglas Gregor [Fri, 23 Jan 2009 21:04:18 +0000 (21:04 +0000)]
Hopefully the last of the APSInt signedness issues with initializers. Fixes PR clang/3378

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

15 years agoAdded clang option '--analyzer-display-progress' to indicate that the analyzer should...
Ted Kremenek [Fri, 23 Jan 2009 20:52:26 +0000 (20:52 +0000)]
Added clang option '--analyzer-display-progress' to indicate that the analyzer should output 'ANALYZE:' messages to display its progress on a source file.

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

15 years agoAdded virtual method DiagnosticClient::IncludeInDiagnosticCounts(). This is used...
Ted Kremenek [Fri, 23 Jan 2009 20:28:53 +0000 (20:28 +0000)]
Added virtual method DiagnosticClient::IncludeInDiagnosticCounts().  This is used by Diagnostics to determine if a diagnostic sent to a given DiagnosticClient should be included in the count of diagnostics.  The default implementation of this method returns 'true'.

Implemented DiagCollector::IncludeInDiagnosticCounts() to return 'false' so that the batching of diagnostics for use with BugReporter doesn't mess up the count of real diagnostics.

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

15 years agoccc: Finish definition of long argument translations.
Daniel Dunbar [Fri, 23 Jan 2009 20:08:16 +0000 (20:08 +0000)]
ccc: Finish definition of long argument translations.
 - However, these last ones do not actually work; the issue is that
   they translate to batches of options and need to be reparsed. For
   now we just give an unsupported error on them.

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

15 years agoWhen using -analyzer-output-plist always output a plist file even if it contains...
Ted Kremenek [Fri, 23 Jan 2009 20:06:20 +0000 (20:06 +0000)]
When using -analyzer-output-plist always output a plist file even if it contains no error reports.

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

15 years agoccc: Another batch of long argument translations.
Daniel Dunbar [Fri, 23 Jan 2009 19:40:54 +0000 (19:40 +0000)]
ccc: Another batch of long argument translations.
 - Again turned up a few which don't do anything sensible.

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

15 years agoAllow subtraction of function pointer types in C, as a GNU extension. Fixes rdar...
Douglas Gregor [Fri, 23 Jan 2009 19:03:35 +0000 (19:03 +0000)]
Allow subtraction of function pointer types in C, as a GNU extension. Fixes rdar://problem/6520707

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

15 years agoMake sure all of the isUnsigned flags line up when comparing initializer values,...
Douglas Gregor [Fri, 23 Jan 2009 18:58:42 +0000 (18:58 +0000)]
Make sure all of the isUnsigned flags line up when comparing initializer values, to really really fix PR clang/3377

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

15 years agoHandle pointer arithmetic on function pointers.
Daniel Dunbar [Fri, 23 Jan 2009 18:51:09 +0000 (18:51 +0000)]
Handle pointer arithmetic on function pointers.
 - <rdar://problem/6518844> Clang-generated bitcode crashes LLVM while compiling function pointer addition expression

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

15 years agoThis is a follow-up to r62675:
Chris Lattner [Fri, 23 Jan 2009 18:35:48 +0000 (18:35 +0000)]
This is a follow-up to r62675:

Refactor how the preprocessor changes a token from being an tok::identifier to a
keyword (e.g. tok::kw_for).  Instead of doing this in HandleIdentifier, hoist this
common case out into the caller, so that every keyword doesn't have to go through
HandleIdentifier.  This drops time in HandleIdentifier from 1.25ms to .62ms, and
speeds up clang -Eonly with PTH by about 1%.

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

15 years agoPreprocessor doesn't require and IdentifierInfoLookup object.
Chris Lattner [Fri, 23 Jan 2009 18:00:48 +0000 (18:00 +0000)]
Preprocessor doesn't require and IdentifierInfoLookup object.
Patch by Axel Naumann!

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

15 years agoChecked in an oops!
Fariborz Jahanian [Fri, 23 Jan 2009 17:48:29 +0000 (17:48 +0000)]
Checked in an oops!

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

15 years agoAnother missing LLVM type for objc2's new abi defined.
Fariborz Jahanian [Fri, 23 Jan 2009 17:41:22 +0000 (17:41 +0000)]
Another missing LLVM type for objc2's new abi defined.

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

15 years agoProperly manage the bit-widths of APInts/APSInts in array initialization.
Douglas Gregor [Fri, 23 Jan 2009 16:54:12 +0000 (16:54 +0000)]
Properly manage the bit-widths of APInts/APSInts in array initialization.
Fixes PR clang/3377

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

15 years agoHandle any undeclared parameters in a K&R-style function with a
Douglas Gregor [Fri, 23 Jan 2009 16:23:13 +0000 (16:23 +0000)]
Handle any undeclared parameters in a K&R-style function with a
special action, inside function prototype scope. This avoids confusion
when we try to inject these parameters into the scope of the function
body before the function itself has been added to the surrounding
scope. Fixes <rdar://problem/6097326>.

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

15 years agoImplement retrieval of the default value of element and field regions.
Zhongxing Xu [Fri, 23 Jan 2009 11:22:12 +0000 (11:22 +0000)]
Implement retrieval of the default value of element and field regions.

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

15 years agoNow this comment should be resolved. See the comments for the KillSet.
Zhongxing Xu [Fri, 23 Jan 2009 10:42:17 +0000 (10:42 +0000)]
Now this comment should be resolved. See the comments for the KillSet.

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

15 years agoAdd a test case for init expr of array and struct type.
Zhongxing Xu [Fri, 23 Jan 2009 10:23:13 +0000 (10:23 +0000)]
Add a test case for init expr of array and struct type.

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

15 years agoWhen getting the element region type, we should get the rvalue type of the super
Zhongxing Xu [Fri, 23 Jan 2009 10:19:29 +0000 (10:19 +0000)]
When getting the element region type, we should get the rvalue type of the super
region. Otherwise we would get an extra level of pointer type.

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

15 years agoccc: Implement long options which take joined & separate forms.
Daniel Dunbar [Fri, 23 Jan 2009 08:16:41 +0000 (08:16 +0000)]
ccc: Implement long options which take joined & separate forms.

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

15 years agoccc: Support long ('--...') flag arguments.
Daniel Dunbar [Fri, 23 Jan 2009 02:00:46 +0000 (02:00 +0000)]
ccc: Support long ('--...') flag arguments.
 - Curiously, a number of the current translations gcc does appear to
   be useless?

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

15 years agoDefine LLVM types for nonfragile abi metadata.
Fariborz Jahanian [Fri, 23 Jan 2009 01:46:23 +0000 (01:46 +0000)]
Define LLVM types for nonfragile abi metadata.

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

15 years agoccc: Organize long options together.
Daniel Dunbar [Fri, 23 Jan 2009 01:31:44 +0000 (01:31 +0000)]
ccc: Organize long options together.

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

15 years agoMake -ast-dump print Objective-C method declarations (and other
Douglas Gregor [Fri, 23 Jan 2009 01:10:18 +0000 (01:10 +0000)]
Make -ast-dump print Objective-C method declarations (and other
Objective-C declarations!) again. Fixes <rdar://problem/6517155>

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

15 years agoccc: Add support for several more aliases (--ansi, --assemble,
Daniel Dunbar [Fri, 23 Jan 2009 00:54:03 +0000 (00:54 +0000)]
ccc: Add support for several more aliases (--ansi, --assemble,
--assert, --classpath).
 - Requires providing some option parameters to over-ride rendering in
   order to match gcc. There may be a cleaner way to do this (probably
   by introducing a new option type for long JoinedOrSeparate forms).

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

15 years agoccc: Darwin/x86/link: Fix a few incompatibilities with gcc (missed
Daniel Dunbar [Fri, 23 Jan 2009 00:39:52 +0000 (00:39 +0000)]
ccc: Darwin/x86/link: Fix a few incompatibilities with gcc (missed
forwarding -s to linker, and was only taking last arg in some cases
when should have been taking all).

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

15 years agoSupport arithmetic on pointer-to-function types as a GNU
Douglas Gregor [Fri, 23 Jan 2009 00:36:41 +0000 (00:36 +0000)]
Support arithmetic on pointer-to-function types as a GNU
extension. Addresses clang PR/3371.

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

15 years agoccc: Add support for "alias" options.
Daniel Dunbar [Fri, 23 Jan 2009 00:14:46 +0000 (00:14 +0000)]
ccc: Add support for "alias" options.
 - Unlike groups (which gather distinct but related options), aliases
   are for options like '--all-warnings' which are effectively treated
   like some other option ('-Wall') both in the driver logic and when
   passing to tools.

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

15 years agoUpdate comment.
Chris Lattner [Fri, 23 Jan 2009 00:13:28 +0000 (00:13 +0000)]
Update comment.

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

15 years agoUpdated checker build.
Ted Kremenek [Fri, 23 Jan 2009 00:11:54 +0000 (00:11 +0000)]
Updated checker build.

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

15 years agoccc: Fix typo; isn't dynamic typing fun!
Daniel Dunbar [Fri, 23 Jan 2009 00:04:43 +0000 (00:04 +0000)]
ccc: Fix typo; isn't dynamic typing fun!

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

15 years agoFor now, return UnknownVal() in RegionStore::getElementsSize() for AnonTypedRegions...
Ted Kremenek [Thu, 22 Jan 2009 23:56:56 +0000 (23:56 +0000)]
For now, return UnknownVal() in RegionStore::getElementsSize() for AnonTypedRegions.  It wasn't really doing the right thing and was crashing on rdar-6442306-1.m.  This fix causes all path-sensitive test cases to pass with RegionStore.

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

15 years agoremove my gross #ifdef's, using portable abstractions now that the 32-bit
Chris Lattner [Thu, 22 Jan 2009 23:50:07 +0000 (23:50 +0000)]
remove my gross #ifdef's, using portable abstractions now that the 32-bit
load is always aligned.

I verified that the bswap doesn't occur in the assembly code on x86.

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

15 years agoAdd RegionStore support for the implicit object region that 'self' references. This...
Ted Kremenek [Thu, 22 Jan 2009 23:43:57 +0000 (23:43 +0000)]
Add RegionStore support for the implicit object region that 'self' references.  This causes tests 'ObjCProperties.m' and 'refcnt_naming.m' to now pass with RegionStore.

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

15 years agoReimplement the handling of the "current object" in designator
Douglas Gregor [Thu, 22 Jan 2009 23:26:18 +0000 (23:26 +0000)]
Reimplement the handling of the "current object" in designator
initializers, so that we are within the appropriate subobject after
we've processed a multi-designator designation. We're matching GCC and
EDG's behavior on all examples I've found thus far.

*Huge* thanks to Eli Friedman for pointing out my fundamental
misunderstanding of "current object" in the C99 spec.

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

15 years agoccc: Bug fix, driver logic was allowing child jobs to pipe output when
Daniel Dunbar [Thu, 22 Jan 2009 23:19:32 +0000 (23:19 +0000)]
ccc: Bug fix, driver logic was allowing child jobs to pipe output when
parent wasn't expecting it.

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

15 years agoDisable language extensions for the clang parser.
Steve Naroff [Thu, 22 Jan 2009 23:06:24 +0000 (23:06 +0000)]
Disable language extensions for the clang parser.

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

15 years agoUse NonFragileABI as name of new Next abi. More comments
Fariborz Jahanian [Thu, 22 Jan 2009 23:02:58 +0000 (23:02 +0000)]
Use NonFragileABI as name of new Next abi. More comments
for the new meta-data.

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

15 years agoThis test case now passes with RegionStore.
Ted Kremenek [Thu, 22 Jan 2009 22:53:05 +0000 (22:53 +0000)]
This test case now passes with RegionStore.

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

15 years agoThis test case now passes with RegionStore.
Ted Kremenek [Thu, 22 Jan 2009 22:51:46 +0000 (22:51 +0000)]
This test case now passes with RegionStore.

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

15 years agoThis test case now passes with RegionStore.
Ted Kremenek [Thu, 22 Jan 2009 22:50:46 +0000 (22:50 +0000)]
This test case now passes with RegionStore.

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

15 years agoThis test case now passes with RegionStore.
Ted Kremenek [Thu, 22 Jan 2009 22:49:49 +0000 (22:49 +0000)]
This test case now passes with RegionStore.

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

15 years agoEnhance test case to test RegionStore with -checker-cfref.
Ted Kremenek [Thu, 22 Jan 2009 22:46:40 +0000 (22:46 +0000)]
Enhance test case to test RegionStore with -checker-cfref.

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

15 years agoThis test case now passes with RegionStore.
Ted Kremenek [Thu, 22 Jan 2009 22:45:21 +0000 (22:45 +0000)]
This test case now passes with RegionStore.

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

15 years agoThis test case now passes with RegionStore.
Ted Kremenek [Thu, 22 Jan 2009 22:43:59 +0000 (22:43 +0000)]
This test case now passes with RegionStore.

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

15 years agoThis test case now passes with RegionStore.
Ted Kremenek [Thu, 22 Jan 2009 22:42:59 +0000 (22:42 +0000)]
This test case now passes with RegionStore.

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

15 years agoThis test case now passes with RegionStore.
Ted Kremenek [Thu, 22 Jan 2009 22:42:16 +0000 (22:42 +0000)]
This test case now passes with RegionStore.

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

15 years agoThis test case now passes with RegionStore.
Ted Kremenek [Thu, 22 Jan 2009 22:40:54 +0000 (22:40 +0000)]
This test case now passes with RegionStore.

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

15 years agoAdjust to api change.
Chris Lattner [Thu, 22 Jan 2009 20:57:52 +0000 (20:57 +0000)]
Adjust to api change.

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

15 years agoTest more array logic in outofbound.c
Ted Kremenek [Thu, 22 Jan 2009 20:36:33 +0000 (20:36 +0000)]
Test more array logic in outofbound.c

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

15 years agoFix RegionStore::getLValueElement() to handle the case when the base region is not...
Ted Kremenek [Thu, 22 Jan 2009 20:27:48 +0000 (20:27 +0000)]
Fix RegionStore::getLValueElement() to handle the case when the base region is not an ElementRegion (also do some cleanups of its core logic).
This gets array-struct.c to work with RegionStore.

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

15 years agoremove Read8/Read24, which are dead. Rename Read16/Read32 to be more
Chris Lattner [Thu, 22 Jan 2009 19:48:26 +0000 (19:48 +0000)]
remove Read8/Read24, which are dead.  Rename Read16/Read32 to be more
descriptive.

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

15 years agoinline Sema::getLangOptions, rdar://6515190. This speeds up
Chris Lattner [Thu, 22 Jan 2009 19:21:44 +0000 (19:21 +0000)]
inline Sema::getLangOptions, rdar://6515190.  This speeds up
fsyntax-only with PTH by 3%.

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

15 years agoThese test cases now pass with RegionStore.
Ted Kremenek [Thu, 22 Jan 2009 18:54:47 +0000 (18:54 +0000)]
These test cases now pass with RegionStore.

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

15 years agoThe 'misc-ps.m' test case now passes with RegionStore. One case needed to be split...
Ted Kremenek [Thu, 22 Jan 2009 18:53:15 +0000 (18:53 +0000)]
The 'misc-ps.m' test case now passes with RegionStore.  One case needed to be split out into 'misc-ps-basic-store.m' and 'misc-ps-region-store.m' because the behavior was different between the two store models (RegionStore flags an additional valid bug).

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

15 years agoSymbolReaper::isLive(SymbolRef) now always returns true for SymbolRegionRvalues becau...
Ted Kremenek [Thu, 22 Jan 2009 18:51:33 +0000 (18:51 +0000)]
SymbolReaper::isLive(SymbolRef) now always returns true for SymbolRegionRvalues because these represent the symbolic values for parameters/globals upon entry to the function.  These values are always ;live' because they represent constraints on the context of how the function was called.  This will be useful for both summary generation but is also necessary to get RegionStore's lazy-binding of locations to symbols to work in practice with RemoveDeadBindings.

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

15 years agoStatic analyzer: Remove a bunch of outdated SymbolData objects and
Ted Kremenek [Thu, 22 Jan 2009 18:23:34 +0000 (18:23 +0000)]
Static analyzer: Remove a bunch of outdated SymbolData objects and
their associated APIs.  We no longer need separate SymbolData objects
for fields, variables, etc.  Instead, we now associated symbols with
the "rvalue" of a MemRegion (i.e., the value stored at that region).
Now we only have two kinds of SymbolData objects: SymbolRegionRValue
and SymbolConjured.

This cleanup also makes the distinction between a SymbolicRegion and a
symbolic value that is a location much clearer.  A SymbolicRegion
represents a chunk of symbolic memory, while a symbolic location is
just a "pointer" with different possible values.  Without any specific
knowledge, a symbolic location resolves (i.e., via a dereference) to a
SymbolicRegion.  In the future, when we do better alias reasoning, a
symbolic location can become an alias for another location, thus
merging the constraints on the referred SymbolicRegion with the other
region.

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

15 years agoAdd a switch that allows disabling the smart pointers.
Sebastian Redl [Thu, 22 Jan 2009 17:31:11 +0000 (17:31 +0000)]
Add a switch that allows disabling the smart pointers.
Uncomment the define in Ownership.h to disable the smart pointers.
Disabled, the smart pointers no longer contain a pointer
to the action, and no longer have special destruction or
copying semantics. They are, compiler willing, raw
pointers or ActionResult equivalents.

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

15 years agoEXTWARNify the warning about unnamed typedefs of enums
Douglas Gregor [Thu, 22 Jan 2009 16:23:54 +0000 (16:23 +0000)]
EXTWARNify the warning about unnamed typedefs of enums

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

15 years agoAvoid creating .dir files in the installation area.
Mike Stump [Thu, 22 Jan 2009 02:53:03 +0000 (02:53 +0000)]
Avoid creating .dir files in the installation area.

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

15 years agoccc/clang: Mimic llvm-gcc initialization of LLVM backend based on gcc
Daniel Dunbar [Thu, 22 Jan 2009 01:55:46 +0000 (01:55 +0000)]
ccc/clang: Mimic llvm-gcc initialization of LLVM backend based on gcc
options (for example, to set relocation model or enable unwind table generation).

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

15 years agoInitial implementation of semantic analysis and ASTs for C99
Douglas Gregor [Thu, 22 Jan 2009 00:58:24 +0000 (00:58 +0000)]
Initial implementation of semantic analysis and ASTs for C99
designated initializers. This implementation should cover all of the
constraints in C99 6.7.8, including long, complex designations and
computing the size of incomplete array types initialized with a
designated initializer. Please see the new test-case and holler if you
find cases where this doesn't work.

There are still some wrinkles with GNU's anonymous structs and
anonymous unions (it isn't clear how these should work; we'll just
follow GCC's lead) and with designated initializers for the members of a
union. I'll tackle those very soon.

CodeGen is still nonexistent, and there's some leftover code in the
parser's representation of designators that I'll also need to clean up.

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

15 years agoMore refactoring of common API to the common class for
Fariborz Jahanian [Thu, 22 Jan 2009 00:37:21 +0000 (00:37 +0000)]
More refactoring of common API to the common class for
the two Next's objc runtimes. More comments.

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

15 years agoAllow creation of "dummy" compile units for debug information.
Daniel Dunbar [Thu, 22 Jan 2009 00:09:25 +0000 (00:09 +0000)]
Allow creation of "dummy" compile units for debug information.
 - Although gross, this is needed currently to ensure that we produce
   well formed debug information (to match pace with the assertions
   being added to DebugInfo in LLVM).

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