Commit Graph

71188 Commits

Author SHA1 Message Date
Chris Lattner a117dd23e9 Declare classes with matched tags, pointed out by a clang++ warning.
llvm-svn: 86144
2009-11-05 17:51:44 +00:00
Douglas Gregor 13a2c03801 Eliminate some false positives due to a thinko in the "'blah' is
always zero in this context" warning logic. Also, make the diagnostic
itself more precise when referring to pointer values ("NULL" vs. "zero").

llvm-svn: 86143
2009-11-05 17:49:26 +00:00
Sebastian Redl fec61e2111 Add Ubuntu 9.10 libstdc++ install location.
llvm-svn: 86142
2009-11-05 17:44:49 +00:00
Benjamin Kramer b971445ab7 Teach SimplifyLibCalls to fold memcmp calls with constant arguments.
llvm-svn: 86141
2009-11-05 17:44:22 +00:00
Sebastian Redl 65ae200a13 When collecting types for built-in candidates, make arrays decay to pointers. Otherwise, subscripting an array leads to no candidates at all. Fixes PR5360.
llvm-svn: 86140
2009-11-05 16:36:20 +00:00
Daniel Dunbar d3f630f4d5 Add clang_site_config user variable, so that extra tests (e.g., utils/C++Syntax)
can always find the main clang site config (when invoked via CMake/Makefiles, at
least).

llvm-svn: 86139
2009-11-05 16:36:19 +00:00
Daniel Dunbar 1891a167a1 lit: Add --param NAME=VALUE option, for test suite specific use (to communicate
arbitrary command line arguments to the test suite).

llvm-svn: 86137
2009-11-05 16:27:33 +00:00
Sebastian Redl 2dfdb820ca Allow the element type of arrays to be incomplete in C++.
This fixes PR5048. Also fix a bug where zero-sized arrays weren't warned about when the size was unsigned.

llvm-svn: 86136
2009-11-05 15:52:31 +00:00
Sebastian Redl 39c2a8bbbc Parse C++0x constexpr. Test case follows when this does something useful.
llvm-svn: 86135
2009-11-05 15:47:02 +00:00
Daniel Dunbar 2fd33fe701 Don't run anything other than the compiler in these tests.
llvm-svn: 86134
2009-11-05 15:28:24 +00:00
Benjamin Kramer 3fcbb82151 Do map insert+find in one step. TODO -= 2.
llvm-svn: 86133
2009-11-05 14:33:27 +00:00
Benjamin Kramer 9470ecdb2c Path::createDirectoryOnDisk should ignore existing directories on win32 too.
llvm-svn: 86132
2009-11-05 14:32:40 +00:00
Douglas Gregor 73818d685e Make two more LLVM headers standalone
llvm-svn: 86131
2009-11-05 13:39:23 +00:00
Douglas Gregor 9ad44629c3 Make a few headers standalone. Plus, add a missing "template" keyword
that Clang diagnoses but GCC does not.

llvm-svn: 86130
2009-11-05 13:30:28 +00:00
Douglas Gregor 3ec1bf240d Fixed two places where we needed to force completion of a type
(without complaining if it fails) to get proper semantics: reference
binding with a derived-to-base conversion and the enumeration of
constructors for user-defined conversions. There are probably more
cases to fix, but my prior attempt at statically ensuring that
complete-type checking always happens failed. Perhaps I'll try again.

With this change, Clang can parse include/llvm/*.h!

llvm-svn: 86129
2009-11-05 13:06:35 +00:00
John McCall 1fa36b7cab Implement the conditional-operator part of -Wsign-compare. Turn
DiagnoseSignCompare into Sema::CheckSignCompare and call it from more places.

Add some enumerator tests.  These seem to expose some oddities in the
types we're converting C++ enumerators to;  in particular, they're converting
to unsigned before int, which seems to contradict 4.5 [conv.prom] p2.

Note to self: stop baiting Doug in my commit messages.

llvm-svn: 86128
2009-11-05 09:23:39 +00:00
Ted Kremenek c92ff053e9 Tweak wording and classifications of analyzer diagnostics.
llvm-svn: 86127
2009-11-05 08:30:12 +00:00
Ted Kremenek 8b64a734b8 Update checker build.
llvm-svn: 86126
2009-11-05 08:07:41 +00:00
Daniel Dunbar 377eb21801 Add EXTRA_TESTDIRS variable for specifying additional test directories.
llvm-svn: 86122
2009-11-05 06:55:24 +00:00
Mike Stump c550768a11 References can't be zero; omit zero check for return value adjustments
in covariant thunks that return references.

llvm-svn: 86121
2009-11-05 06:32:02 +00:00
Mike Stump b8da7a046d Refine covariant return value adjustments for thunks when null
pointers are returned.

llvm-svn: 86120
2009-11-05 06:12:26 +00:00
Chris Lattner 046dff7acf merge a few crash tests into crash.ll
llvm-svn: 86119
2009-11-05 05:57:34 +00:00
Mike Stump 098da869a7 Testcase for a recent checkin.
llvm-svn: 86118
2009-11-05 05:26:28 +00:00
Mike Stump abcffc3b59 Update.
llvm-svn: 86117
2009-11-05 05:01:19 +00:00
Mike Stump 2b84dd39be Refine layout for indirect virtual base classes.
llvm-svn: 86116
2009-11-05 04:02:15 +00:00
Mike Stump 5ff76e2fa2 Fix 80-col violation.
llvm-svn: 86115
2009-11-05 03:47:55 +00:00
Mon P Wang 1a58236c2b Reintroduce support for overloading target intrinsics
llvm-svn: 86114
2009-11-05 03:19:08 +00:00
Daniel Dunbar 0231895ce6 Replace DiagnosticClient::setLangOptions with {Begin,End}SourceFile, and clarify
invariants (diagnostics with source informations must occur between
{Begin,End}SourceFile).

llvm-svn: 86113
2009-11-05 02:42:12 +00:00
Daniel Dunbar b5f2025b77 Convert CreateAnalysisConsumer and friends to just take a const Preprocessor&, and simplify.
llvm-svn: 86112
2009-11-05 02:41:58 +00:00
Daniel Dunbar 78eaff4c13 Remove unused SetPreprocessor method.
llvm-svn: 86111
2009-11-05 02:41:44 +00:00
Ted Kremenek 165f5b7421 AnalysisManager: Don't rely on PathDiagnosicClients flushing their diagnostics when they are destroyed.
llvm-svn: 86110
2009-11-05 02:17:33 +00:00
Daniel Dunbar aef52f4c83 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.

llvm-svn: 86109
2009-11-05 02:11:37 +00:00
Ted Kremenek 5e86044ec4 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.

llvm-svn: 86108
2009-11-05 02:09:23 +00:00
Daniel Dunbar a2ff3b4819 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.

llvm-svn: 86107
2009-11-05 01:54:02 +00:00
Daniel Dunbar 07dcd8b9d8 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*.

llvm-svn: 86106
2009-11-05 01:53:52 +00:00
Daniel Dunbar f539bfeb4d StringRefize Preprocessor::getIdentifierInfo.
llvm-svn: 86105
2009-11-05 01:53:39 +00:00
Daniel Dunbar c00be15469 Simplify.
llvm-svn: 86104
2009-11-05 01:53:23 +00:00
Daniel Dunbar b6362c13c9 CreatePreprocessor cannot fail
llvm-svn: 86103
2009-11-05 01:53:12 +00:00
David Goodwin 542649463b Replace std::map.at() with std::map[].
llvm-svn: 86102
2009-11-05 01:45:50 +00:00
David Goodwin 7d8878add2 Break anti-dependencies using free registers in a round-robin manner to avoid introducing new anti-dependencies.
llvm-svn: 86098
2009-11-05 01:19:35 +00:00
Lang Hames 274be49480 Tidied some ugliness in the SlotIndex default constructor.
llvm-svn: 86097
2009-11-05 01:18:31 +00:00
Evan Cheng 66549b2818 Now that code placement optimization pass is run for JIT, make sure it's before pre-emit passes.
llvm-svn: 86092
2009-11-05 01:16:59 +00:00
Devang Patel ba52f03052 Use WeakVH while storing metadata in containers.
This fixes PR5393.

llvm-svn: 86091
2009-11-05 01:13:02 +00:00
Lang Hames a31fd78ff8 Removed an assert which was causing significant slowdowns in debug builds.
This assert was very conservative to begin with (the error condition is well
covered by tests elsewhere in the code) so we won't miss much by removing it.

llvm-svn: 86088
2009-11-05 00:52:28 +00:00
Douglas Gregor 5287f091b2 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.

llvm-svn: 86087
2009-11-05 00:51:44 +00:00
Bob Wilson 45119d8850 Add -mtriple to llc commands, attempting to fix buildbot failures.
llvm-svn: 86086
2009-11-05 00:51:31 +00:00
Evan Cheng 921152fe9d Code refactoring.
llvm-svn: 86085
2009-11-05 00:51:13 +00:00
Ted Kremenek 209e31b883 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.

llvm-svn: 86084
2009-11-05 00:42:23 +00:00
John McCall 644a4181c9 Implement -Wsign-compare, or at least the actual comparison part of it.
Conditional operands are next.

Fixes part of rdar://problem/7289584.

llvm-svn: 86083
2009-11-05 00:40:04 +00:00
Bob Wilson 90d0b82e12 Attempt again to fix buildbot failures: make expected output less specific
and compile with -mtriple to specify *-apple-darwin targets.

llvm-svn: 86081
2009-11-05 00:30:35 +00:00