]> granicus.if.org Git - clang/log
clang
15 years agoFix 80-col violation.
Mike Stump [Thu, 5 Nov 2009 03:47:55 +0000 (03:47 +0000)]
Fix 80-col violation.

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

15 years agoReplace DiagnosticClient::setLangOptions with {Begin,End}SourceFile, and clarify
Daniel Dunbar [Thu, 5 Nov 2009 02:42:12 +0000 (02:42 +0000)]
Replace DiagnosticClient::setLangOptions with {Begin,End}SourceFile, and clarify
invariants (diagnostics with source informations must occur between
{Begin,End}SourceFile).

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

15 years agoConvert CreateAnalysisConsumer and friends to just take a const Preprocessor&, and...
Daniel Dunbar [Thu, 5 Nov 2009 02:41:58 +0000 (02:41 +0000)]
Convert CreateAnalysisConsumer and friends to just take a const Preprocessor&, and simplify.

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

15 years agoRemove unused SetPreprocessor method.
Daniel Dunbar [Thu, 5 Nov 2009 02:41:44 +0000 (02:41 +0000)]
Remove unused SetPreprocessor method.

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

15 years agoAnalysisManager: Don't rely on PathDiagnosicClients flushing their diagnostics when...
Ted Kremenek [Thu, 5 Nov 2009 02:17:33 +0000 (02:17 +0000)]
AnalysisManager: Don't rely on PathDiagnosicClients flushing their diagnostics when they are destroyed.

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

15 years agoRemove clang-cc -html-diags option, this doesn't fit in well and we get plenty
Daniel Dunbar [Thu, 5 Nov 2009 02:11:37 +0000 (02:11 +0000)]
Remove clang-cc -html-diags option, this doesn't fit in well and we get plenty
of coverage of this from the analyzer.

If this bothers you, I can add it back in a mode where non-source diagnostics go
to stderr and only source diagnostics use -html-diags, but I don't think anyone
uses this.

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

15 years agoActing on Daniel's nagging, remove PathDiagnosticClientFactory() and
Ted Kremenek [Thu, 5 Nov 2009 02:09:23 +0000 (02:09 +0000)]
Acting on Daniel's nagging, remove PathDiagnosticClientFactory() and
migrate work in the destructors of PathDiagnosticClients from their
destructors to FlushReports().  The destructors now currently call
FlushReports(); this will be fixed in a subsequent patch.

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

15 years agoMake html::{SyntaxHighlight,HighlightMacros} take a const Preprocessor.
Daniel Dunbar [Thu, 5 Nov 2009 01:54:02 +0000 (01:54 +0000)]
Make html::{SyntaxHighlight,HighlightMacros} take a const Preprocessor.

This is conceptually correct, but adds a huge hack to HighlightMacros which is
in fact doing all sorts of mutation to the Preprocessor. See FIXME.

Chris, please review.

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

15 years agoMake LookUpIdentifierInfo const. This makes the Identifiers table mutable and is
Daniel Dunbar [Thu, 5 Nov 2009 01:53:52 +0000 (01:53 +0000)]
Make LookUpIdentifierInfo const. This makes the Identifiers table mutable and is
a little fuzzy, but conceptually it's just uniquing the identifier.

Chris, please review. I debated splitting into const/non-const versions where
the const one propogated constness to the resulting IdentifierInfo*.

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

15 years agoStringRefize Preprocessor::getIdentifierInfo.
Daniel Dunbar [Thu, 5 Nov 2009 01:53:39 +0000 (01:53 +0000)]
StringRefize Preprocessor::getIdentifierInfo.

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

15 years agoSimplify.
Daniel Dunbar [Thu, 5 Nov 2009 01:53:23 +0000 (01:53 +0000)]
Simplify.

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

15 years agoCreatePreprocessor cannot fail
Daniel Dunbar [Thu, 5 Nov 2009 01:53:12 +0000 (01:53 +0000)]
CreatePreprocessor cannot fail

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

15 years agoWhen instantiating a UnaryOperator, allow the resulting expression to
Douglas Gregor [Thu, 5 Nov 2009 00:51:44 +0000 (00:51 +0000)]
When instantiating a UnaryOperator, allow the resulting expression to
still be dependent or invoke an overloaded operator. Previously, we
only supported builtin operators.

BinaryOperator/CompoundAssignOperator didn't have this issue because
we always built a CXXOperatorCallExpr node, even when name lookup
didn't find any functions to save until instantiation time. Now, that
code builds a BinaryOperator or CompoundAssignOperator rather than a
CXXOperatorCallExpr, to save some space.

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

15 years agoModify GRExprEngine::EvalBind() to take both a "store expression" and
Ted Kremenek [Thu, 5 Nov 2009 00:42:23 +0000 (00:42 +0000)]
Modify GRExprEngine::EvalBind() to take both a "store expression" and
an "assign expression", representing the expressions where the value
binding occurs and the assignment takes place respectively.  These are
largely syntactic clues for better error reporting.

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

15 years agoImplement -Wsign-compare, or at least the actual comparison part of it.
John McCall [Thu, 5 Nov 2009 00:40:04 +0000 (00:40 +0000)]
Implement -Wsign-compare, or at least the actual comparison part of it.
Conditional operands are next.

Fixes part of rdar://problem/7289584.

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

15 years agoMake sure to grab CVR qualifiers from the canonical type. ARGH!
Douglas Gregor [Thu, 5 Nov 2009 00:07:36 +0000 (00:07 +0000)]
Make sure to grab CVR qualifiers from the canonical type. ARGH!

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

15 years agoKill PreprocessorFactory, which was both morally repugnant and totally unused.
Daniel Dunbar [Wed, 4 Nov 2009 23:56:25 +0000 (23:56 +0000)]
Kill PreprocessorFactory, which was both morally repugnant and totally unused.

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

15 years agoTurn if chain into switch.
Daniel Dunbar [Wed, 4 Nov 2009 23:41:40 +0000 (23:41 +0000)]
Turn if chain into switch.

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

15 years agoTweak formatting.
Daniel Dunbar [Wed, 4 Nov 2009 23:41:27 +0000 (23:41 +0000)]
Tweak formatting.

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

15 years agoWhen instantiating a MemberExpr, be sure to instantiate the
Douglas Gregor [Wed, 4 Nov 2009 23:20:05 +0000 (23:20 +0000)]
When instantiating a MemberExpr, be sure to instantiate the
explicitly-specified template arguments, too!

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

15 years agoComments, formatting. Based on patch by Brandon Pearcy!
John McCall [Wed, 4 Nov 2009 23:13:52 +0000 (23:13 +0000)]
Comments, formatting.  Based on patch by Brandon Pearcy!

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

15 years agoA simple reordering of the definitions in stdint.h and
Chris Lattner [Wed, 4 Nov 2009 23:03:18 +0000 (23:03 +0000)]
A simple reordering of the definitions in stdint.h and
introduces no new function changes.   Patch by Ken Dyck!

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

15 years agoDiagnose using a field to initialize itself. Patch by Brandon Pearcy!
John McCall [Wed, 4 Nov 2009 23:02:40 +0000 (23:02 +0000)]
Diagnose using a field to initialize itself.  Patch by Brandon Pearcy!

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

15 years agoWhen starting a C++ member access expression, make sure to compute the
Douglas Gregor [Wed, 4 Nov 2009 22:49:18 +0000 (22:49 +0000)]
When starting a C++ member access expression, make sure to compute the
type of the object even when it is dependent. Specifically, this makes
sure that we get the right type for "this->", which is important when
performing name lookup into this scope to determine whether an
identifier or operator-function-id is a template name.

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

15 years agoignore two new -W flags, patch by Tom Jablin!
Chris Lattner [Wed, 4 Nov 2009 22:47:56 +0000 (22:47 +0000)]
ignore two new -W flags, patch by Tom Jablin!

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

15 years agoGive DeclarationName's operator< a more predictable, useful ordering
Douglas Gregor [Wed, 4 Nov 2009 22:24:30 +0000 (22:24 +0000)]
Give DeclarationName's operator< a more predictable, useful ordering

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

15 years agoFixed for running on Windows.
John Thompson [Wed, 4 Nov 2009 21:52:17 +0000 (21:52 +0000)]
Fixed for running on Windows.

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

15 years agoFix a little canonical-types issue with non-type template arguments.
Douglas Gregor [Wed, 4 Nov 2009 21:50:46 +0000 (21:50 +0000)]
Fix a little canonical-types issue with non-type template arguments.
Fixes PR5349.

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

15 years agoInitializePreprocessor cannot fail.
Daniel Dunbar [Wed, 4 Nov 2009 21:13:15 +0000 (21:13 +0000)]
InitializePreprocessor cannot fail.

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

15 years agoMove -undef flag into PreprocessorInitOptions
Daniel Dunbar [Wed, 4 Nov 2009 21:13:02 +0000 (21:13 +0000)]
Move -undef flag into PreprocessorInitOptions

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

15 years agoAdd code gen for pointer-to-member function in
Fariborz Jahanian [Wed, 4 Nov 2009 19:13:37 +0000 (19:13 +0000)]
Add code gen for pointer-to-member function in
ctor's initializer. Fixes pr5178.

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

15 years agoProperly replace (cxxscope, template-id) annotation tokens with a
Douglas Gregor [Wed, 4 Nov 2009 18:18:19 +0000 (18:18 +0000)]
Properly replace (cxxscope, template-id) annotation tokens with a
single typename annotation token when backtracing. Fixes PR5350.

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

15 years agoThis patch extends CleanupScope to support destruction
Fariborz Jahanian [Wed, 4 Nov 2009 17:57:40 +0000 (17:57 +0000)]
This patch extends CleanupScope to support destruction
of array objects on block exit. Patch is by Anders Calrsson.

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

15 years agoDon't try to check the initialization of fields with dependent
Douglas Gregor [Wed, 4 Nov 2009 17:16:11 +0000 (17:16 +0000)]
Don't try to check the initialization of fields with dependent
types. Fixes PR5352.

Fariborz, please review.

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

15 years agoStore the unresolved class type in MemberPointerType's Class field,
Douglas Gregor [Wed, 4 Nov 2009 16:49:01 +0000 (16:49 +0000)]
Store the unresolved class type in MemberPointerType's Class field,
from Peter Collingbourne!

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

15 years agothis test has started failing due to an optimizer change. Clang tests
Chris Lattner [Wed, 4 Nov 2009 16:37:13 +0000 (16:37 +0000)]
this test has started failing due to an optimizer change.  Clang tests
should only look at -O0 IR output not -O3 assembly output.  XFAIL it for
now.

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

15 years agoEliminate the "old" ways of parsing operator-function-ids and
Douglas Gregor [Wed, 4 Nov 2009 16:32:12 +0000 (16:32 +0000)]
Eliminate the "old" ways of parsing operator-function-ids and
conversion-function-ids; all clients have moved on to
ParseUnqualifiedId.

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

15 years agoSwitch parsing of using declarations over to ParseUnqualifiedId.
Douglas Gregor [Wed, 4 Nov 2009 16:30:06 +0000 (16:30 +0000)]
Switch parsing of using declarations over to ParseUnqualifiedId.

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

15 years agoPreserve type source information in sizeof/alignof expressions, and pass it
John McCall [Wed, 4 Nov 2009 07:28:41 +0000 (07:28 +0000)]
Preserve type source information in sizeof/alignof expressions, and pass it
through to indexing.

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

15 years agoWhen performing template instantiation (transformation) of
Douglas Gregor [Wed, 4 Nov 2009 07:01:15 +0000 (07:01 +0000)]
When performing template instantiation (transformation) of
expressions, keep track of whether we are immediately taking the
address of the expression. Pass this flag when building a declaration
name expression so that we handle pointer-to-member constants
properly.

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

15 years agoFix commento.
Daniel Dunbar [Wed, 4 Nov 2009 06:57:08 +0000 (06:57 +0000)]
Fix commento.

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

15 years agoUpdate CMake.
Daniel Dunbar [Wed, 4 Nov 2009 06:39:40 +0000 (06:39 +0000)]
Update CMake.

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

15 years agoMove -fcolor-diagnostics logic to driver.
Daniel Dunbar [Wed, 4 Nov 2009 06:24:57 +0000 (06:24 +0000)]
Move -fcolor-diagnostics logic to driver.

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

15 years agoMove logic for selection -fmessage-length= to driver.
Daniel Dunbar [Wed, 4 Nov 2009 06:24:47 +0000 (06:24 +0000)]
Move logic for selection -fmessage-length= to driver.

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

15 years agoFix indentation.
Daniel Dunbar [Wed, 4 Nov 2009 06:24:38 +0000 (06:24 +0000)]
Fix indentation.

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

15 years agoFactor out a diagnostic options class.
Daniel Dunbar [Wed, 4 Nov 2009 06:24:30 +0000 (06:24 +0000)]
Factor out a diagnostic options class.

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

15 years agoAdd FIXME.
Ted Kremenek [Wed, 4 Nov 2009 04:24:44 +0000 (04:24 +0000)]
Add FIXME.

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

15 years agoCatch uses of undefined values when they are used in assignment, thus catching such...
Ted Kremenek [Wed, 4 Nov 2009 04:24:16 +0000 (04:24 +0000)]
Catch uses of undefined values when they are used in assignment, thus catching such bugs closer to the source.

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

15 years agoAdd mising #ifdef guards.
Ted Kremenek [Wed, 4 Nov 2009 04:03:43 +0000 (04:03 +0000)]
Add mising #ifdef guards.

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

15 years agoDiagnose the use of 'fastcall' on functions without prototypes or with
John McCall [Wed, 4 Nov 2009 03:36:09 +0000 (03:36 +0000)]
Diagnose the use of 'fastcall' on functions without prototypes or with
varargs prototypes.

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

15 years agoDiagnose __builtin_offsetof on incomplete types. Fixes
John McCall [Wed, 4 Nov 2009 03:03:43 +0000 (03:03 +0000)]
Diagnose __builtin_offsetof on incomplete types.  Fixes
rdar://problem/7222956

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

15 years agoChange our basic strategy for avoiding deprecation warnings when the decl use
John McCall [Wed, 4 Nov 2009 02:18:39 +0000 (02:18 +0000)]
Change our basic strategy for avoiding deprecation warnings when the decl use
appears in a deprecated context.  In the new strategy, we emit the warnings
as usual unless we're currently parsing a declaration, where "declaration" is
restricted to mean a decl group or a few special cases in Objective C.  If
we *are* parsing a declaration, we queue up the deprecation warnings until
the declaration has been completely parsed, and then emit them only if the
decl is not deprecated.
We also standardize the bookkeeping for deprecation so as to avoid special cases.

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

15 years agoMerge ZeroSizedVLAChecker and UndefSizedVLAChecker.
Zhongxing Xu [Wed, 4 Nov 2009 01:43:07 +0000 (01:43 +0000)]
Merge ZeroSizedVLAChecker and UndefSizedVLAChecker.

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

15 years agoMerge constant array and structures. This will create a global variables for arrays...
Tanya Lattner [Wed, 4 Nov 2009 01:18:09 +0000 (01:18 +0000)]
Merge constant array and structures. This will create a global variables for arrays and structs that are constant and their initializer is constant. It is on by default but can be disable with the flag -fno-merge-all-constants.

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

15 years agoFix 80-col violations.
Mike Stump [Wed, 4 Nov 2009 01:11:15 +0000 (01:11 +0000)]
Fix 80-col violations.

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

15 years agoImplement support for parsing dependent template-ids that refer to
Douglas Gregor [Wed, 4 Nov 2009 00:56:37 +0000 (00:56 +0000)]
Implement support for parsing dependent template-ids that refer to
overloaded operators, e.g.,

  p->template operator+<T>()

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

15 years agoSplit out return adjustments in thunks from this adjustment in thunks
Mike Stump [Wed, 4 Nov 2009 00:53:51 +0000 (00:53 +0000)]
Split out return adjustments in thunks from this adjustment in thunks
so the optimizer can tailcall into the return value adjustment thunk.
This improves codesize for complex hierarchies.

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

15 years agoUse unsigned char instead of unsigned : 8 to make the optimizer happier.
Daniel Dunbar [Wed, 4 Nov 2009 00:34:40 +0000 (00:34 +0000)]
Use unsigned char instead of unsigned : 8 to make the optimizer happier.

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

15 years agoRefactor StoreManager::BindDecl() to take a VarRegion* instead of a VarDecl*, and...
Ted Kremenek [Wed, 4 Nov 2009 00:09:15 +0000 (00:09 +0000)]
Refactor StoreManager::BindDecl() to take a VarRegion* instead of a VarDecl*, and modify GRExprEngine::EvalBind() to handle decl initialization as well.  This paves the way for adding "checker" visitation in EvalBind().

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

15 years agoMisc cleanups.
Mike Stump [Tue, 3 Nov 2009 23:50:34 +0000 (23:50 +0000)]
Misc cleanups.

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

15 years agoTest case for recent checkin.
Mike Stump [Tue, 3 Nov 2009 23:32:42 +0000 (23:32 +0000)]
Test case for recent checkin.

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

15 years agoChange GRTransferFuncs::RegisterChecks() to take a GRExprEngine& instead of a BugRepo...
Ted Kremenek [Tue, 3 Nov 2009 23:30:34 +0000 (23:30 +0000)]
Change GRTransferFuncs::RegisterChecks() to take a GRExprEngine& instead of a BugReporter&.  This paves the way for pulling some of the retain/release checker into a "Checker" class.

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

15 years agoRefine volatile handling, specifically, we must have the canonical
Mike Stump [Tue, 3 Nov 2009 23:25:48 +0000 (23:25 +0000)]
Refine volatile handling, specifically, we must have the canonical
type to look at the volatile specifier.  I found these all from just
hand auditing the code.

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

15 years agoParsing and semantic analysis for template-ids that name overloaded
Douglas Gregor [Tue, 3 Nov 2009 23:16:33 +0000 (23:16 +0000)]
Parsing and semantic analysis for template-ids that name overloaded
operators, e.g.,

  operator+<int>

which now works in declarators, id-expressions, and member access
expressions. This commit only implements the non-dependent case, where
we can resolve the template-id to an actual declaration.

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

15 years agomake 'make clean' work on Solaris, per Gabor Greif comment
Nuno Lopes [Tue, 3 Nov 2009 22:39:56 +0000 (22:39 +0000)]
make 'make clean' work on Solaris, per Gabor Greif comment

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

15 years agomake 'make clean' clean everything
Nuno Lopes [Tue, 3 Nov 2009 22:21:28 +0000 (22:21 +0000)]
make 'make clean' clean everything

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

15 years agoWe have to ensure we have the canonical type to do this. This is but
Mike Stump [Tue, 3 Nov 2009 22:20:01 +0000 (22:20 +0000)]
We have to ensure we have the canonical type to do this.  This is but
one instance of a large problem.  assert for non-canoical types would
help track down these things.

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

15 years agoset svn:ignore
Nuno Lopes [Tue, 3 Nov 2009 22:17:39 +0000 (22:17 +0000)]
set svn:ignore

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

15 years agoTweak some comments about unqualified-id and id-expression parsing. No functionality...
Douglas Gregor [Tue, 3 Nov 2009 21:24:04 +0000 (21:24 +0000)]
Tweak some comments about unqualified-id and id-expression parsing. No functionality change

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

15 years agoCFieldCallback doesn't need to create an ExtensionRAIIObject: it's actually
John McCall [Tue, 3 Nov 2009 21:13:47 +0000 (21:13 +0000)]
CFieldCallback doesn't need to create an ExtensionRAIIObject:  it's actually
automatically shadowed by the ExtensionRAIIObject created by
ParseStructDeclaration.

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

15 years agoRemove a bunch of #if 0'd code made irrelevant by the latest ParseUnqualifiedId changes
Douglas Gregor [Tue, 3 Nov 2009 20:53:48 +0000 (20:53 +0000)]
Remove a bunch of #if 0'd code made irrelevant by the latest ParseUnqualifiedId changes

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

15 years agoRemove previous patch for pr5296 due to further clarification
Fariborz Jahanian [Tue, 3 Nov 2009 20:38:53 +0000 (20:38 +0000)]
Remove previous patch for pr5296 due to further clarification
of value-initialization and trivial constructors.

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

15 years agoImplement support for the -undef command line option, patch by
Chris Lattner [Tue, 3 Nov 2009 19:50:27 +0000 (19:50 +0000)]
Implement support for the -undef command line option, patch by
Roman Divacky! PR5363

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

15 years agosilence a warning.
Chris Lattner [Tue, 3 Nov 2009 19:48:51 +0000 (19:48 +0000)]
silence a warning.

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

15 years agoReplace the code that parses member access expressions after "." or
Douglas Gregor [Tue, 3 Nov 2009 19:44:04 +0000 (19:44 +0000)]
Replace the code that parses member access expressions after "." or
"->" with a use of ParseUnqualifiedId. Collapse
ActOnMemberReferenceExpr, ActOnDestructorReferenceExpr (both of them),
ActOnOverloadedOperatorReferenceExpr,
ActOnConversionOperatorReferenceExpr, and
ActOnMemberTemplateIdReferenceExpr into a single, new action
ActOnMemberAccessExpr that does the same thing more cleanly (and can
keep more source-location information).

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

15 years agoSilence a warning by giving Parser::FieldCallback a virtual destructor, and
John McCall [Tue, 3 Nov 2009 19:33:12 +0000 (19:33 +0000)]
Silence a warning by giving Parser::FieldCallback a virtual destructor, and
anchor the vtable to Parser.cpp for good measure.

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

15 years agovtable testcase for recent work on vcall/vbase offsets.
Mike Stump [Tue, 3 Nov 2009 19:28:52 +0000 (19:28 +0000)]
vtable testcase for recent work on vcall/vbase offsets.

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

15 years agoReorganize the parsing of decl groups / function definitions so that
John McCall [Tue, 3 Nov 2009 19:26:08 +0000 (19:26 +0000)]
Reorganize the parsing of decl groups / function definitions so that
declarators are parsed primarily within a single function (at least for
these cases).  Remove some excess diagnostics arising during parse failures.

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

15 years agoRefine codegen for covariant thunks that return references.
Mike Stump [Tue, 3 Nov 2009 19:03:17 +0000 (19:03 +0000)]
Refine codegen for covariant thunks that return references.

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

15 years agoMerge NullDerefChecker.[h,cpp] and UndefDerefChecker.[h,cpp]. They are essentially...
Ted Kremenek [Tue, 3 Nov 2009 18:41:06 +0000 (18:41 +0000)]
Merge NullDerefChecker.[h,cpp] and UndefDerefChecker.[h,cpp].  They are essentially two parts of the same check.

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

15 years agoFix tests to not depend on /dev/null existing.
Daniel Dunbar [Tue, 3 Nov 2009 17:56:18 +0000 (17:56 +0000)]
Fix tests to not depend on /dev/null existing.

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

15 years agoRefine return value adjustments for thunks.
Mike Stump [Tue, 3 Nov 2009 16:59:27 +0000 (16:59 +0000)]
Refine return value adjustments for thunks.

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

15 years agoUse ParseUnqualifiedId when parsing id-expressions. This eliminates
Douglas Gregor [Tue, 3 Nov 2009 16:56:39 +0000 (16:56 +0000)]
Use ParseUnqualifiedId when parsing id-expressions. This eliminates
yet another copy of the unqualified-id parsing code.

Also, use UnqualifiedId to simplify the Action interface for building
id-expressions. ActOnIdentifierExpr, ActOnCXXOperatorFunctionIdExpr,
ActOnCXXConversionFunctionExpr, and ActOnTemplateIdExpr have all been
removed in favor of the new ActOnIdExpression action.

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

15 years agoFix documentation.
Mike Stump [Tue, 3 Nov 2009 16:11:57 +0000 (16:11 +0000)]
Fix documentation.

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

15 years agoUpdate CMakeLists.
Benjamin Kramer [Tue, 3 Nov 2009 13:37:33 +0000 (13:37 +0000)]
Update CMakeLists.

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

15 years agoPull VLA size checker into its own files.
Zhongxing Xu [Tue, 3 Nov 2009 12:13:38 +0000 (12:13 +0000)]
Pull VLA size checker into its own files.
Split it to two checkers, one for undefined size,
the other for zero size, so that we don't need to query the size
when emitting the bug report.

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

15 years agoAdd link to FatELF project.
Daniel Dunbar [Tue, 3 Nov 2009 08:18:34 +0000 (08:18 +0000)]
Add link to FatELF project.

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

15 years agoImplement: <rdar://problem/6250216> Warn against using -[NSAutoreleasePool release...
Ted Kremenek [Tue, 3 Nov 2009 08:03:59 +0000 (08:03 +0000)]
Implement: <rdar://problem/6250216> Warn against using -[NSAutoreleasePool release] in GC mode

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

15 years agoMove 'static inline' functions GetNullarySelector() and GetUnarySelector() from CFRef...
Ted Kremenek [Tue, 3 Nov 2009 08:00:42 +0000 (08:00 +0000)]
Move 'static inline' functions GetNullarySelector() and GetUnarySelector() from CFRefCount.cpp to ASTContext.h.  These functions are likely to be generally useful.

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

15 years agoXFAIL Driver/hello.c on Windows.
Daniel Dunbar [Tue, 3 Nov 2009 07:49:31 +0000 (07:49 +0000)]
XFAIL Driver/hello.c on Windows.

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

15 years agoPull AttrNonNullChecker into its own files.
Zhongxing Xu [Tue, 3 Nov 2009 07:35:33 +0000 (07:35 +0000)]
Pull AttrNonNullChecker into its own files.

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

15 years agoAdd target_triple to Clang site configuration.
Daniel Dunbar [Tue, 3 Nov 2009 07:25:53 +0000 (07:25 +0000)]
Add target_triple to Clang site configuration.

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

15 years agoSwitch XFAIL format to match LLVM.
Daniel Dunbar [Tue, 3 Nov 2009 07:25:45 +0000 (07:25 +0000)]
Switch XFAIL format to match LLVM.

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

15 years agoUpdate CMake file.
Zhongxing Xu [Tue, 3 Nov 2009 07:14:39 +0000 (07:14 +0000)]
Update CMake file.

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

15 years agoRename NSErrorCheck to NSErrorChecker.
Ted Kremenek [Tue, 3 Nov 2009 06:59:59 +0000 (06:59 +0000)]
Rename NSErrorCheck to NSErrorChecker.

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

15 years agoUpdate CMake file.
Ted Kremenek [Tue, 3 Nov 2009 06:46:41 +0000 (06:46 +0000)]
Update CMake file.

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

15 years agoPull UndefinedArgChecker into its own files.
Zhongxing Xu [Tue, 3 Nov 2009 06:46:03 +0000 (06:46 +0000)]
Pull UndefinedArgChecker into its own files.

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

15 years agoFix buffer overflow in PrintMacroDefinition() by inverting the check to see if the...
Ted Kremenek [Tue, 3 Nov 2009 06:18:05 +0000 (06:18 +0000)]
Fix buffer overflow in PrintMacroDefinition() by inverting the check to see if the target buffer needs to be resized.  Fixes <rdar://problem/7255377>.

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

15 years agoPull BadCallChecker into its own files.
Zhongxing Xu [Tue, 3 Nov 2009 05:48:04 +0000 (05:48 +0000)]
Pull BadCallChecker into its own files.

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

15 years agoretain/release checker: CGBitmapContextCreateWithData() returns an owned object.
Ted Kremenek [Tue, 3 Nov 2009 05:39:12 +0000 (05:39 +0000)]
retain/release checker: CGBitmapContextCreateWithData() returns an owned object.

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