]> granicus.if.org Git - clang/log
clang
15 years agoABITestGen: Add generation of vector types.
Daniel Dunbar [Mon, 26 Jan 2009 19:05:20 +0000 (19:05 +0000)]
ABITestGen: Add generation of vector types.

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

15 years agoMeta-data for nonfragile-abi's categories
Fariborz Jahanian [Mon, 26 Jan 2009 18:32:24 +0000 (18:32 +0000)]
Meta-data for nonfragile-abi's categories

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

15 years agomake sure we have a definition of uintptr_t.
Chris Lattner [Mon, 26 Jan 2009 18:21:04 +0000 (18:21 +0000)]
make sure we have a definition of uintptr_t.

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

15 years agoMany updates to Windows project files.
Steve Naroff [Mon, 26 Jan 2009 18:09:40 +0000 (18:09 +0000)]
Many updates to Windows project files.

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

15 years agoComment fix.
Daniel Dunbar [Mon, 26 Jan 2009 18:02:34 +0000 (18:02 +0000)]
Comment fix.

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

15 years agoccc: -o should not be automatically forwarded to generic gcc tools.
Daniel Dunbar [Mon, 26 Jan 2009 18:00:14 +0000 (18:00 +0000)]
ccc: -o should not be automatically forwarded to generic gcc tools.

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

15 years agoccc: Recognize -emit-llvm [-S].
Daniel Dunbar [Mon, 26 Jan 2009 17:09:15 +0000 (17:09 +0000)]
ccc: Recognize -emit-llvm [-S].
 - Unlike llvm-gcc, this doesn't yet treat -emit-llvm output as a
   linker input.

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

15 years agostart plumbing together the line table information. So far we just
Chris Lattner [Mon, 26 Jan 2009 07:57:50 +0000 (07:57 +0000)]
start plumbing together the line table information.  So far we just
unique the Filenames in #line directives, assigning them UIDs.

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

15 years agoLazily paging in file contents is a big win for PTH, strip out the old
Chris Lattner [Mon, 26 Jan 2009 07:37:49 +0000 (07:37 +0000)]
Lazily paging in file contents is a big win for PTH, strip out the old
testing code.

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

15 years agoBitmangle file characteristic bits into the low bits of
Chris Lattner [Mon, 26 Jan 2009 06:49:09 +0000 (06:49 +0000)]
Bitmangle file characteristic bits into the low bits of
the content cache pointer.  This saves 105876 bytes on
cocoa.h because it shrinks the SLocEntry union, which
we have a big array of.  It would be nice to use
PointerIntPair here, but we can't because it is in a
union.

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

15 years agoadd parsing and constraint enforcement for GNU line marker directives.
Chris Lattner [Mon, 26 Jan 2009 06:19:46 +0000 (06:19 +0000)]
add parsing and constraint enforcement for GNU line marker directives.

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

15 years agoUse tag classes instead of typedefs for GDM entries 'ConstNotEq' and 'ConstEq'. ...
Ted Kremenek [Mon, 26 Jan 2009 06:04:53 +0000 (06:04 +0000)]
Use tag classes instead of typedefs for GDM entries 'ConstNotEq' and 'ConstEq'.  This avoids collisions in the GDM.

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

15 years agoadd another sanity test.
Chris Lattner [Mon, 26 Jan 2009 05:44:13 +0000 (05:44 +0000)]
add another sanity test.

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

15 years agoa few minor cleanups
Chris Lattner [Mon, 26 Jan 2009 05:30:54 +0000 (05:30 +0000)]
a few minor cleanups

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

15 years agoparse and enforce required constraints on #line directives. Right now
Chris Lattner [Mon, 26 Jan 2009 05:29:08 +0000 (05:29 +0000)]
parse and enforce required constraints on #line directives.  Right now
we just discard them.

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

15 years agoadded to wrong directory
Chris Lattner [Mon, 26 Jan 2009 04:36:31 +0000 (04:36 +0000)]
added to wrong directory

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

15 years agoan insane macro testcase.
Chris Lattner [Mon, 26 Jan 2009 04:36:10 +0000 (04:36 +0000)]
an insane macro testcase.

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

15 years agoeagerly resolve the spelling locations of macro argument preexpansions.
Chris Lattner [Mon, 26 Jan 2009 04:33:10 +0000 (04:33 +0000)]
eagerly resolve the spelling locations of macro argument preexpansions.
This reduces fsyntax-only time on c99-intconst-1.c from 2.43s down to
2.01s (20%), reducing the number of fileid lookups from 2529040 linear
and 64771121 binary to 5625902 linear and 4151182 binary.

This knocks getFileID down to only 4.6% of compile time on this testcase.
At this point, malloc/free is over 35% of compile time, primarily allocating
MacroArgs objects and their argument preexpansion vectors.

I don't feel like malloc avoiding right now, so I'm just going to call
this good.

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

15 years agoEagerly resolve the spelling location of the tokens in a definition
Chris Lattner [Mon, 26 Jan 2009 04:06:48 +0000 (04:06 +0000)]
Eagerly resolve the spelling location of the tokens in a definition
of a macro.  Since these tokens may themselves be from macro
expansions, we need to resolve down to the spelling loc when the
macro ends up being instantiated.  Instead of resolving this for
each token expanded from the macro definition, just do it once when
the macro is defined.  This speeds up clang on c99-intconst-1.c from
2.66s to 2.43s (9.5%), reducing the FileID lookups from 407244 linear and
114175649 binary to 2529040 linear and 64771121 binary.

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

15 years agoOnly resolve a macro's instantiation loc once per macro, instead of once
Chris Lattner [Mon, 26 Jan 2009 03:46:22 +0000 (03:46 +0000)]
Only resolve a macro's instantiation loc once per macro, instead of once
per token lexed from it.  This speeds up clang on c99-intconst-1.c from
the GCC testsuite from 3.64s to 2.66s (36%).  This reduces the number of
binary search FileID lookups from 251570522 to 114175649 on this testcase.

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

15 years agoPR3269: create an empty InitListExpr as a child for the
Eli Friedman [Mon, 26 Jan 2009 01:33:06 +0000 (01:33 +0000)]
PR3269: create an empty InitListExpr as a child for the
CompoundLiteralExpr so that there aren't any null pointers in the AST.

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

15 years agoCheck in the long promised SourceLocation rewrite. This lays the
Chris Lattner [Mon, 26 Jan 2009 00:43:02 +0000 (00:43 +0000)]
Check in the long promised SourceLocation rewrite.  This lays the
ground work for implementing #line, and fixes the "out of macro ID's"
problem.

There is nothing particularly tricky about the code, other than the
very performance sensitive SourceManager::getFileID() method.

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

15 years agoUpdate C++ status table with new member pointer conversion capabilities.
Sebastian Redl [Mon, 26 Jan 2009 00:11:25 +0000 (00:11 +0000)]
Update C++ status table with new member pointer conversion capabilities.

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

15 years agoimprove ASTContext::getDeclAlign comment, as suggested by Eli.
Chris Lattner [Sun, 25 Jan 2009 23:06:38 +0000 (23:06 +0000)]
improve ASTContext::getDeclAlign comment, as suggested by Eli.

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

15 years agouse simpler method
Chris Lattner [Sun, 25 Jan 2009 22:02:19 +0000 (22:02 +0000)]
use simpler method

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

15 years agoImplement implicit conversions for pointers-to-member.
Sebastian Redl [Sun, 25 Jan 2009 19:43:20 +0000 (19:43 +0000)]
Implement implicit conversions for pointers-to-member.

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

15 years agoIntroduce an explicit case for member pointers in CodeGenTypes. However, it simply...
Sebastian Redl [Sun, 25 Jan 2009 13:35:30 +0000 (13:35 +0000)]
Introduce an explicit case for member pointers in CodeGenTypes. However, it simply asserts.

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

15 years agoFix compile error from r62953.
Sebastian Redl [Sun, 25 Jan 2009 13:34:47 +0000 (13:34 +0000)]
Fix compile error from r62953.

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

15 years agoOne more case for Expr::isConstantInitializer; I think this covers
Eli Friedman [Sun, 25 Jan 2009 03:27:40 +0000 (03:27 +0000)]
One more case for Expr::isConstantInitializer; I think this covers
everything that we aren't intending to implement in Expr::Evaluate.

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

15 years agoEnhancements to Expr::isConstantInitializer to deal with a few
Eli Friedman [Sun, 25 Jan 2009 03:12:18 +0000 (03:12 +0000)]
Enhancements to Expr::isConstantInitializer to deal with a few
cases it couldn't deal with before.

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

15 years agoRename Expr::isConstantExpr to Expr::isConstantInitializer; this more
Eli Friedman [Sun, 25 Jan 2009 02:32:41 +0000 (02:32 +0000)]
Rename Expr::isConstantExpr to Expr::isConstantInitializer; this more
accurately states what the function is trying to do and how it is
different from Expr::isEvaluatable.  Also get rid of a parameter that is both
unused and inaccurate.

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

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