Fariborz Jahanian
eb80c98a72
Fix a code gen bug in i386-apple-darwin (objc fragile abi), sending
...
message to 'super'. Fixes radar 7205866.
llvm-svn: 87017
2009-11-12 20:14:24 +00:00
Daniel Dunbar
b0a1942196
Spell empty StringRef correctly (0 is a null StringRef, which is not the same).
...
llvm-svn: 87011
2009-11-12 18:40:12 +00:00
Douglas Gregor
49ba3cabdd
Recognize (and check) pointer-to-member template arguments that are
...
non-type template parameters or constants of pointer-to-member
type. Once checked, be sure to retain those pointer-to-member
constants as expressions if they are dependent, or as declarations if
they are not dependent.
llvm-svn: 87010
2009-11-12 18:38:13 +00:00
Devang Patel
94f798c079
"Attach debug info with llvm instructions" mode was enabled a month ago. Now make it permanent and remove old way of inserting intrinsics to encode debug info for locations and types.
...
llvm-svn: 87007
2009-11-12 18:21:39 +00:00
Devang Patel
6e98d7af22
Use getNameAsCString() instead of getName().data()
...
llvm-svn: 87001
2009-11-12 17:49:47 +00:00
Douglas Gregor
4e948ce769
When instantiating a reference to a non-type template parameter of pointer to
...
member type (e.g., T Class::*Member), build a pointer-to-member
constant expression. Previously, we we just building a simple
declaration reference expression, which meant that the expression was
not treated as a pointer to member.
llvm-svn: 87000
2009-11-12 17:40:13 +00:00
Chandler Carruth
bc55fe26c6
Move CompileOptions -> CodeGenOptions, and sink it into the CodeGen library.
...
This resolves the layering violation where CodeGen depended on Frontend.
llvm-svn: 86998
2009-11-12 17:24:48 +00:00
Anders Carlsson
9a1cd87d17
Set CK_BaseToDerived in TryStaticDowncast.
...
llvm-svn: 86996
2009-11-12 16:53:16 +00:00
Douglas Gregor
6051c8d344
Give CanQual<T> an implicit conversion to bool, so that it can be used
...
in "if" statements like:
if (CanQual<ReferenceType> RefType = T.getAs<ReferenceType>())
Thanks to Clang for pointing out this mistake :)
llvm-svn: 86995
2009-11-12 16:49:45 +00:00
Anders Carlsson
a70ad93f8a
Add a CK_BaseToDerived cast kind.
...
llvm-svn: 86994
2009-11-12 16:43:42 +00:00
Douglas Gregor
19ac2d6494
When comparing template parameter lists, distinguish between three cases:
...
- Comparing template parameter lists to determine if we have a redeclaration
- Comparing template parameter lists to determine if we have equivalent
template template parameters
- Comparing template parameter lists to determine whether a template
template argument is valid for a given template template parameter.
Previously, we did not distinguish between the last two cases, which
got us into trouble when we were looking for exact type matches
between the types of non-type template parameters that were dependent
types. Now we do, so we properly delay checking of template template
arguments until instantiation time.
Also, fix an accidental fall-through in a case statement that was
causing crashes.
llvm-svn: 86992
2009-11-12 16:20:59 +00:00
Daniel Dunbar
068ae76e02
Disallow FIX-ITs when generating code.
...
llvm-svn: 86990
2009-11-12 15:42:53 +00:00
Douglas Gregor
ef986e8fc3
Improve source-location information for implicitly-generated member call expressions
...
llvm-svn: 86989
2009-11-12 15:31:47 +00:00
Daniel Dunbar
91cd960d50
clang-cc: Coalesce frontend options further.
...
llvm-svn: 86988
2009-11-12 15:23:20 +00:00
Benjamin Kramer
1eb8569bcb
Fix MSVC build.
...
llvm-svn: 86983
2009-11-12 12:30:05 +00:00
Zhongxing Xu
c6d9292197
update CMakefile
...
llvm-svn: 86979
2009-11-12 08:39:33 +00:00
Zhongxing Xu
88cca6b085
Add boilerplate logic for a malloc/free checker.
...
llvm-svn: 86978
2009-11-12 08:38:56 +00:00
Chris Lattner
55c9877b66
Generalize stdint.h for non-8-bit-multiple types, patch by
...
Ken Dyck!
"This adds definitions for types of 8-bit multiples
from 8 to 64 to stdint.h and rationalizes the selection of types
for the exact-width definitions in InitPreprocessor.cpp."
llvm-svn: 86977
2009-11-12 08:08:27 +00:00
Chris Lattner
0fb5bbd401
do not store wchar/char16/char32/intmax width/alignment info
...
into TargetInfo, just derive this based on the underlying type.
This prevents them from getting out of synch, patch by Ken Dyck!
llvm-svn: 86976
2009-11-12 08:04:33 +00:00
Daniel Dunbar
4c0e8274e9
Move warning options into DiagnosticOptions.
...
llvm-svn: 86968
2009-11-12 07:28:44 +00:00
Daniel Dunbar
71ed08ba39
Avoid comparing string literals.
...
llvm-svn: 86967
2009-11-12 07:28:29 +00:00
Daniel Dunbar
8fd69a09cc
Move dump-build-information option into DiagnosticOptions.
...
llvm-svn: 86966
2009-11-12 07:28:21 +00:00
Daniel Dunbar
ec256a921f
clang-cc: Factor CreateDiagnosticEngine out of main.
...
llvm-svn: 86963
2009-11-12 06:48:31 +00:00
Daniel Dunbar
0d1defd4cd
clang-cc: -fixit is actually option, not an action, although its use with non
...
-fsyntax-only is probably untested.
llvm-svn: 86962
2009-11-12 06:48:24 +00:00
Daniel Dunbar
723e74ab75
Simplify.
...
llvm-svn: 86961
2009-11-12 06:48:17 +00:00
Ted Kremenek
6c37c5c356
PthreadLockChecker doesn't need PreVisitCallExpr() yet. All the current logic should be done in PostVisitCallExpr()
...
llvm-svn: 86959
2009-11-12 06:26:58 +00:00
Ted Kremenek
d48568f641
Add most of the boilerplate logic for a simple pthread_mutux_lock() -> pthread_mutex_unlock() checker. We need to add a visitor method to Checker for handling dead symbols in order to detect locks that are not unlocked.
...
llvm-svn: 86958
2009-11-12 06:17:47 +00:00
Ted Kremenek
386a2a52d3
Remove obsolete 'struct NullDerefTag'.
...
llvm-svn: 86957
2009-11-12 06:16:18 +00:00
Rafael Espindola
f401fa0386
Use the --with-c-include-dirs configure option.
...
llvm-svn: 86956
2009-11-12 05:48:41 +00:00
Ted Kremenek
a971afb90f
Enhance Checker class (and GRExprEngine) to support PostVisitation for CallExprs. No clients (yet).
...
llvm-svn: 86949
2009-11-12 04:35:08 +00:00
Ted Kremenek
8f6c4e8617
Remove GRExprEngine::EvalCall(). It had a single callsite in GRExprEngine, and was easily inlined.
...
llvm-svn: 86948
2009-11-12 04:16:35 +00:00
John McCall
84c16cf824
Random const correctness, and incidentally use computeDeclContext when building
...
a using declaration.
llvm-svn: 86942
2009-11-12 03:15:40 +00:00
Daniel Dunbar
2940303363
Move TokenCache option to PreprocessorOptions.
...
llvm-svn: 86940
2009-11-12 02:53:59 +00:00
Daniel Dunbar
1a54e3fbb9
Switch PTHManager to using diagnostics for most errors.
...
Also, always give errors on a token-cache PTH failure.
llvm-svn: 86939
2009-11-12 02:53:48 +00:00
Daniel Dunbar
51637a9ba4
Simplify.
...
llvm-svn: 86938
2009-11-12 02:53:34 +00:00
Daniel Dunbar
1619831fde
clang-cc: Refactor ParseInputFollow to clearly split on the two primary cases,
...
when we are running an AST consumer and when we are just running the
preprocessor or parser alone.
llvm-svn: 86937
2009-11-12 02:53:27 +00:00
Daniel Dunbar
4806f2ea48
clang-cc: Factor ReadPCHFile out of ProcessInputFile.
...
llvm-svn: 86936
2009-11-12 02:53:20 +00:00
Daniel Dunbar
92641dca86
Simplify.
...
llvm-svn: 86935
2009-11-12 02:53:13 +00:00
Daniel Dunbar
7336edd8b2
clang-cc: Unify InitializeSourceManager calls.
...
llvm-svn: 86934
2009-11-12 02:53:06 +00:00
Zhongxing Xu
383c273966
Make StoreManager::getSizeInElements() always return DefinedOrUnknownSVal.
...
llvm-svn: 86932
2009-11-12 02:48:32 +00:00
John McCall
495922cb6a
Note to self: don't leave debugging statements in the code for four hours.
...
llvm-svn: 86931
2009-11-12 02:10:34 +00:00
Daniel Dunbar
f7316732b8
clang-cc: Move non-Consumer action handling to common location, to expose the massive amount of redundancy we have introduced through blind copy-and-paste.
...
llvm-svn: 86922
2009-11-12 01:36:27 +00:00
Daniel Dunbar
f4408a29e1
Fix PCH/preprocess test to be more useful, and unbreak -E mode with implicit
...
PCH, which I broke.
llvm-svn: 86921
2009-11-12 01:36:20 +00:00
Devang Patel
7bdf096f8d
Do not use StringRef while using DebugInfo interface.
...
llvm-svn: 86915
2009-11-12 00:51:46 +00:00
Douglas Gregor
dd6c0356ba
Improve recovery in a wonky case where one tries to specialize a
...
template template parameter.
When building a template-id type, check whether the template-name
itself is dependent (even if the template arguments are not!) and
handle it as a template-id type.
llvm-svn: 86913
2009-11-12 00:46:20 +00:00
Daniel Dunbar
0cfa3c4875
Fix Makefile dependency bug with out-of-dir builds.
...
llvm-svn: 86912
2009-11-12 00:41:49 +00:00
Daniel Dunbar
d8ff51bf49
Fix test portability.
...
llvm-svn: 86911
2009-11-12 00:41:41 +00:00
Daniel Dunbar
a970d39ebf
Tweak AnalyzerOptions for consistency, and make sure default constructed object
...
is sane.
llvm-svn: 86908
2009-11-12 00:24:35 +00:00
Daniel Dunbar
39b6e2a0fd
Tweak formatting.
...
llvm-svn: 86907
2009-11-12 00:24:28 +00:00
Daniel Dunbar
e6de40e747
Move AnalyzerOptions into CompilerInvocation.
...
llvm-svn: 86906
2009-11-12 00:24:10 +00:00