Eli Friedman
eb4b7051a5
Do typechecking and codegen for K&R-style function declarations
...
correctly. Not a regression, but made more obvious by my recent fix
which made function type compatibility checking a bit more strict.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55339 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 21:31:01 +00:00
Ted Kremenek
c9e56b2a63
Update checker build.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55337 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 21:27:06 +00:00
Eli Friedman
c3f07644a7
Fix for PR2720; be a little bit more permissive in initializers for
...
casting pointers to integers.
Eventually, we should check whether we can evaluate an expression
using Expr::tryEvaluate, and this codepath should be tightened to only
handle standard-compliant cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55331 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 20:46:57 +00:00
Daniel Dunbar
6ba82a4a4b
Support __PRETTY_FUNCTION__ and friends in Obj-C methods.
...
Add CodeGenFunction::EmitUnsupportedLValue
- Gives error and returns undef value.
Swap some asserts() over to using EmitUnsupportedLValue
- Rumor has it users (and even some developers) prefer carat
diagnostics to backtraces.
- Works better in Release-Asserts to boot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55328 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 20:45:57 +00:00
Ted Kremenek
d52e425226
Use path information from .info files when computing common prefix information.
...
This partially implements PR 2705: http://llvm.org/bugs/show_bug.cgi?id=2705
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55327 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 20:45:07 +00:00
Ted Kremenek
2ec5cd5535
Use the same 'cc' for generated preprocessed crash files as we do for compilation.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55326 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 20:44:31 +00:00
Ted Kremenek
5a4ddaf39a
ccc-analyzer now correctly reports the exit code from 'cc'.
...
scan-build now correctly reports the exit code from the build command.
Fixes: <rdar://problem/6172224>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55324 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 20:10:45 +00:00
Daniel Dunbar
1e465df22f
Add test case for function-pointer-cast-of-global as constant
...
expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55323 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 20:08:27 +00:00
Ted Kremenek
40aa8b2ec5
Update Xcode project.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55322 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 19:33:19 +00:00
Ted Kremenek
d0c4b28aa9
Added 'extents' for Regions.
...
Added 'getExtent()' to StoreManager.
Implemented 'getExtent()' for BasicStoreManager.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55321 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 19:33:03 +00:00
Anders Carlsson
1fe379f0fa
Objective-C foreach selector elements must be lvalues.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55316 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 18:16:36 +00:00
Daniel Dunbar
d1d66bcd69
Change another is-a-pointer check to check in terms of LLVM type.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55312 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 10:38:11 +00:00
Daniel Dunbar
270cc66683
Do is-a-pointer checks in terms of LLVM types in
...
EmitScalarConversion().
- Important for allowing Obj-C void * to id<X> casts and so on.
- Not sure about this fix however, perhaps Type should understand
that id is effectively a pointer type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55311 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 09:51:32 +00:00
Daniel Dunbar
302684c5e2
Stop asserting in TargetInfo::validateInputConstraint
...
- Sema gives a perfectively nice error message on invalid constraints.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55310 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 09:46:27 +00:00
Daniel Dunbar
f56f1913e9
Fix Obj-C super sends inside class methods.
...
- NeXT loads the super class at runtime; this required changing the
runtime interface to pass more information down.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55307 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 08:19:24 +00:00
Daniel Dunbar
8af9c78c7e
Name struct types generated for Obj-C classes.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55304 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 06:28:15 +00:00
Daniel Dunbar
90db88249a
Use DenseMap on IdentifierInfo instead of StringMap.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55303 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 06:18:57 +00:00
Daniel Dunbar
242d4dce3a
NeXT: Emit symbols used to manage linking of Obj-C classes.
...
- This ensures that references to undefined classes cause link
errors.
- NOTE: This relies on platform specific asm directives currently,
this should be factored out.
Also, don't emit a SYMBOLS metadata entry if there are no symbols.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55302 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 06:02:07 +00:00
Anders Carlsson
2ea2b5e2b0
Handle emitting __builtin_huge_valf as a constant expr.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55299 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 03:27:15 +00:00
Anders Carlsson
29b7e5071c
Make code generation of ivar ref exprs more like member exprs.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55298 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 01:53:23 +00:00
Anders Carlsson
19567ee431
Handle static variables inside obj-c methods.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55297 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 01:38:19 +00:00
Anders Carlsson
6c2dae7923
Convert qualified interface types correctly.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55287 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-24 18:05:19 +00:00
Anders Carlsson
6e14a8f2ac
Fix silly bug in objc_gc attribute parsing and add test case
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55286 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-24 16:33:25 +00:00
Argyrios Kyrtzidis
a88b509d23
Pass SourceRanges by reference to the various Diag methods.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55284 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-24 13:14:02 +00:00
Argyrios Kyrtzidis
897e7a38c7
Add a Parser::Diag overload that can receive a custom string along with a SourceRange.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55283 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-24 12:51:04 +00:00
Argyrios Kyrtzidis
ed5c38682c
Rename Preprocessor::DisableBacktrack -> Preprocessor::CommitBacktrackedTokens.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55281 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-24 12:29:43 +00:00
Cedric Venet
348824f780
Update VS projects.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55280 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-24 11:59:26 +00:00
Chris Lattner
6437406bb6
other updates
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55278 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-24 05:56:54 +00:00
Chris Lattner
3b88ce8e4a
link to c++ status page
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55277 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-24 05:44:37 +00:00
Chris Lattner
3e820afa3a
codegen is still not 'finished', but in a better state than before.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55276 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-24 05:42:07 +00:00
Zhongxing Xu
8148839c10
Moved HTMLDiagnostics to lib/Driver.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55274 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-24 02:33:36 +00:00
Daniel Dunbar
155f49d0ad
Add svn:ignore for docs/{doxygen,doxygen.tar.gz}
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55273 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-24 00:24:17 +00:00
Chris Lattner
e671e1bc73
Comment tweak.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55272 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-24 00:12:08 +00:00
Anders Carlsson
aa0d25b44e
Add support for parsing the objc_gc attribute. Tests will come shortly.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55269 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 23:22:21 +00:00
Chris Lattner
405674c26c
adjust to changes in various APIs from LLVM. We can't print
...
an APInt directly to an ostream now, so add some hacks. It would
be better to switch all of the bugreport (and friends) stuff over
to raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55264 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 22:23:37 +00:00
Anders Carlsson
4f3cc81896
Add carbon.cpp and cocoa.mm tests
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55262 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 22:21:00 +00:00
Anders Carlsson
c303606a8e
Make sure to create CXX record decls for the implicit Obj-C type declarations. This lets us compile Cocoa.h as Objective-C++
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55261 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 22:20:38 +00:00
Daniel Dunbar
4b5c4f27f3
Update ccc driver
...
- Use CCC_ECHO to control echoing behavior (default is on, set to ''
or unset to disable)
- Get 'clang','llc','as','cc','ld' executables from environment. 'cc'
and 'ld' are fetched through CCC_CC and CCC_LD respectively -- to
support make CC=ccc -- the others are through their upcased
versions.
- Add CCC_NATIVE mode.
o This uses llc and as to generate native object files; allowing
more drop-in replacement of gcc.
o Disabled by default, but should eventually be default.
o Allow --emit-llvm in CCC_NATIVE mode to override. Essentially
this makes ccc more like a drop in replacement for llvm-gcc.
- Prevent explicit -x <language> options from annoying clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55260 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 22:15:15 +00:00
Anders Carlsson
b88d45ea7e
treat bool literals as constatnt expressions.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55255 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 21:12:35 +00:00
Anders Carlsson
413ad8b6b5
Handle Objective-C++ tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55254 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 21:03:10 +00:00
Anders Carlsson
ef048ef393
Reserved C++ words are valid selectors in Objective-C++
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55253 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 21:00:01 +00:00
Anders Carlsson
86e9644199
Handle static initializers in Objective-C++ methods.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55250 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 19:42:54 +00:00
Argyrios Kyrtzidis
7267f7832e
Add CodeGen support for CXXZeroInitValueExpr.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55249 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 19:35:47 +00:00
Argyrios Kyrtzidis
2fba1217dc
Add a null pointer test in the type-convert-construct.cpp tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55247 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 19:24:45 +00:00
Anders Carlsson
15425f9d2d
Handle AddrLabelExprs in Expr::isConstantExpr
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55245 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 18:49:32 +00:00
Daniel Dunbar
be38d0274d
Drop a dead call to isConstantExpr()
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55244 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 18:44:10 +00:00
Daniel Dunbar
3e9df9920d
NeXT: Clean up constant CFString handling.
...
- Use CodeGenModule::GetAddrOfConstantCFString
Some tweaks of CodeGenModule::GetAddrOfConstantCFString
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55243 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 18:37:06 +00:00
Chris Lattner
5654ffda8f
Add header search paths for dragonfly, patch by Sascha Wildner!
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55242 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 18:25:07 +00:00
Chris Lattner
eac7aee3a2
Add dragonfly target support, patch by Sascha Wildner
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55241 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 18:23:14 +00:00
Anders Carlsson
67f907141a
Tweak the indentation for a couple of files
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55240 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 16:36:06 +00:00