]>
granicus.if.org Git - clang/log
Daniel Dunbar [Wed, 8 Apr 2009 18:03:55 +0000 (18:03 +0000)]
More fixes to builtin preprocessor defines.
- Add -static-define option driver can use when __STATIC__ should be
defined (instead of __DYNAMIC__).
- Don't set __OPTIMIZE_SIZE__ on Os, __OPTIMIZE_SIZE__ is tied to Oz.
- Set __NO_INLINE__ following GCC 4.2.
- Set __GNU_GNU_INLINE__ or __GNU_STDC_INLINE__ following GCC 4.2.
- Set __EXCEPTIONS for Objective-C NonFragile ABI.
- Set __STRICT_ANSI__ for standard conforming modes.
- I added a clang style test case in utils for this, but its not
particularly portable and I don't think it belongs in the test
suite.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68621
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 8 Apr 2009 17:05:15 +0000 (17:05 +0000)]
Sema::CheckConditionalOperands(): Soften pointer/integer mismatch from error->warning.
Fixes <rdar://problem/
6762239 > [sema] gcc incompatibility; error on incompatible operand types in ?:.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68617
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 8 Apr 2009 16:23:09 +0000 (16:23 +0000)]
Make sure value is initialized when built w/o asserts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68615
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 8 Apr 2009 15:21:36 +0000 (15:21 +0000)]
-Wmissing-prototypes shouldn't complain about main() missing a prototype.
Fixes <rdar://problem/
6759522 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68611
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 8 Apr 2009 06:06:21 +0000 (06:06 +0000)]
Darwin ld: Unconditionally add -lstdc++ if we are pretending to be
g++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68601
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 8 Apr 2009 06:00:32 +0000 (06:00 +0000)]
use escapes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68600
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 8 Apr 2009 05:50:25 +0000 (05:50 +0000)]
some minor edits
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68599
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 8 Apr 2009 05:11:16 +0000 (05:11 +0000)]
Make debug info work when using -save-temps.
- This is pretty ugly, but the most obvious solution. Chime in if you
have a nicer one.
- The problem is that with -save-temps, clang-cc has no idea what the
name of the original input file is. However, the user expects to be
able to set breakpoints based on the input file name.
- We support this by providing a new option -main-file-name (similar
to -dumpbase used by gcc) which allows the driver to pass in the
original file name.
- <rdar://problem/
6753383 > building with clang using --save-temps
gets the compile unit name from the .i file...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68595
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 8 Apr 2009 05:07:30 +0000 (05:07 +0000)]
Initial draft of PTH internals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68594
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 8 Apr 2009 04:48:15 +0000 (04:48 +0000)]
Add a destination type argument to EmitConstantExpr. This will be used for when the destination has a reference type. (No functionality change yet)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68593
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 8 Apr 2009 04:21:03 +0000 (04:21 +0000)]
Implementation definition of interfaces with __objc_exception attribute.
- Complete <rdar://problem/
6635883 > Support __objc_exception__
attribute
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68591
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Wed, 8 Apr 2009 04:16:39 +0000 (04:16 +0000)]
Pointer width on targets like PIC16 is 16-bit, while the valid index size to GEP is only 32 or 64. So promote index to 32 in such cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68590
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 8 Apr 2009 03:47:39 +0000 (03:47 +0000)]
remove fixme!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68589
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 8 Apr 2009 03:36:03 +0000 (03:36 +0000)]
fix typo, noticed by Gabor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68587
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 8 Apr 2009 03:33:43 +0000 (03:33 +0000)]
improve compatibility with VC+, patch by John Thompson!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68586
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 8 Apr 2009 03:07:17 +0000 (03:07 +0000)]
New static analyzer check by Nikita Zhuk!
"The attached patch generates warnings of cases where an ObjC message is sent to
a nil object and the size of return type of that message is larger than the size
of void pointer. This may result in undefined return values as described in PR
2718. The patch also includes test cases."
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68585
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 8 Apr 2009 03:03:23 +0000 (03:03 +0000)]
Set __PIC__ (more) correctly.
- Add -pic-level clang-cc option to specify the value for the define,
updated driver to pass this.
- Added __pic__
- Added OBJC_ZEROCOST_EXCEPTIONS define while I was here (to match gcc).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68584
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 8 Apr 2009 02:55:55 +0000 (02:55 +0000)]
Don't assume that a block always has a FunctionProtoType. Fixes rdar://
6768379 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68583
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 8 Apr 2009 02:07:04 +0000 (02:07 +0000)]
Add basic support for arm static analysis checking. Radar
6699395
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68582
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 7 Apr 2009 23:51:44 +0000 (23:51 +0000)]
Driver: Fix forwarding of -fpascal-strings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68570
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 7 Apr 2009 22:56:58 +0000 (22:56 +0000)]
Fix <rdar://problem/
6764172 > [sema] crash on invalid.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68568
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 7 Apr 2009 22:36:33 +0000 (22:36 +0000)]
Visibility attributes should only be set on definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68561
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 7 Apr 2009 22:13:21 +0000 (22:13 +0000)]
Driver: Fix forwarding of -{std,ansi,trigraphs} when there are
multiple instances of an option.
Also, removed direct -ansi support from clang-cc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68558
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 7 Apr 2009 22:10:22 +0000 (22:10 +0000)]
Shuffle some call code around. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68557
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 7 Apr 2009 21:51:40 +0000 (21:51 +0000)]
Driver: Forward remaining -f options to clang manually.
- Groups are really just intended to hold inherent structure of the
options, not be abused for individual tool argument translation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68554
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 7 Apr 2009 21:42:00 +0000 (21:42 +0000)]
Driver: Only forward last instance of -mmacosx-version-min= and
-isysroot to clang.
- Don't forward arbitrary -i* options to clang, just the ones we know
about.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68553
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 7 Apr 2009 21:25:06 +0000 (21:25 +0000)]
Now that we have __weak defined as attribute in all modes,
we must not issue gc-specific errors in non-gc mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68551
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 7 Apr 2009 21:16:11 +0000 (21:16 +0000)]
Driver: Manually translate a number of -f with no- variants options to
clang.
- We will eventually want some more driver infrastructre for this
probably.
- For now, the clang-cc interface stays relatively the same, but we
don't accept multiple instances anymore, or the [no-] variants
directly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68550
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 7 Apr 2009 21:08:57 +0000 (21:08 +0000)]
Driver: Add default for ArgList::hasFlag and simplify implementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68549
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 7 Apr 2009 20:58:25 +0000 (20:58 +0000)]
Allow us to ask for the access specifier of a translation unit
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68548
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 7 Apr 2009 20:26:30 +0000 (20:26 +0000)]
Propagte -fvisibility to objc2's class symbols.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68543
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 7 Apr 2009 19:37:57 +0000 (19:37 +0000)]
Diagnose uses of function specifiers on declarations which don't declare
functions. Fixes PR3941.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68541
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 7 Apr 2009 19:18:24 +0000 (19:18 +0000)]
Driver: Explicitly warn that -pg isn't supported (even though we
aren't failing the compilation).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68540
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 7 Apr 2009 19:04:18 +0000 (19:04 +0000)]
Driver: Add 'q' flag for options which shouldn't be reported as unused.
- <rdar://problem/
6756295 > warning about '-dynamic' argument unused
during compilation seems incorrect
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68535
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 7 Apr 2009 18:53:24 +0000 (18:53 +0000)]
CFG: when there is not continue or break target, mark the CFG as bad.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68533
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 7 Apr 2009 18:53:02 +0000 (18:53 +0000)]
Remove some dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68532
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 7 Apr 2009 18:28:06 +0000 (18:28 +0000)]
Fixes method name lookup when method appears in
the base implementations (and not in
current implementation).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68527
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 7 Apr 2009 18:21:53 +0000 (18:21 +0000)]
Fix broken test case. I have no idea why this ever worked.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68526
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 7 Apr 2009 18:21:47 +0000 (18:21 +0000)]
Driver: Fix a parsing bug where some options were matched
incorrectly. I'm blanking on the smartest way to write this search,
but we should just do the right thing when we move to TableGen.
- <rdar://problem/
6761194 > [driver] -Wextra-tokens isn't parsed
correctly
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68525
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 7 Apr 2009 18:18:09 +0000 (18:18 +0000)]
add a warning for this crazy case, as suggested by Eli.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68524
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 7 Apr 2009 17:20:56 +0000 (17:20 +0000)]
Move the internal DeclContext data structures into a separate header.
Simplify the addition of a case statement to a switch.
Fix -print-stats for attribute-qualified types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68522
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 7 Apr 2009 17:09:43 +0000 (17:09 +0000)]
Use %s in test, not hard coded name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68521
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 7 Apr 2009 16:50:40 +0000 (16:50 +0000)]
Fariborz points out that weak is now defined to the attribute even
in C mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68520
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 7 Apr 2009 16:32:03 +0000 (16:32 +0000)]
XFAIL a failing test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68519
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 7 Apr 2009 15:07:57 +0000 (15:07 +0000)]
Tweak Sema::ActOnInstanceMessage() to look for a class method when dealing with qualified id's. This change is motivated by our desire to not support the "Class<foo>" idiom. Note that the change makes perfect sense (since all ObjC classes are also id/instances).
This allow us to document a simple migration path...change "Class <foo>" to "id <foo>".
This effects:
- <rdar://problem/
6761939 > TASK: File source change radars for "qualified Class" errors
- <rdar://problem/
6761864 > Protocol qualified Class is unsupported
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68517
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 7 Apr 2009 14:26:58 +0000 (14:26 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68516
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 7 Apr 2009 14:22:40 +0000 (14:22 +0000)]
Fix typo in newly added test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68515
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 7 Apr 2009 14:18:33 +0000 (14:18 +0000)]
Change the type of ObjC @ string constants (from NSConstantString->NSString).
This fixes <rdar://problem/
6757102 > clang type for @"xxx" is "NSConstantString *" (GCC type is "NSString *").
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68514
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 7 Apr 2009 06:43:45 +0000 (06:43 +0000)]
Handle use side of __objc_exception__ attribute; when using an
exception with this attribute we don't need to emit a weak definition
for the exception type information.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68513
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 7 Apr 2009 06:05:28 +0000 (06:05 +0000)]
*everyone* knows that __weak is not defined on linux :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68512
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 7 Apr 2009 06:02:44 +0000 (06:02 +0000)]
implement rdar://
6762183 . I'm not sure if it is more insane that
GCC ignores macro definitions after \n's or that real code depends
on this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68511
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 7 Apr 2009 05:48:37 +0000 (05:48 +0000)]
Various fixes to symbols used for Obj-C x86_64 metadata.
- Changed method names to match gcc (categories names still aren't
mangled in).
- Expose correct name for class and metadata symbols (although
-fvisibility=hidden isn't yet correct).
- Remove several things from llvm.used that didn't need to be there
(I suspect this can still be trimmed).
- Don't use asm-prefix extension for _objc_empty_{cache,vtable} (not
needed).
- Hide EH type class info with -fvisibility=hidden
- Change setGlobal[Option]Visibility to not change the visibility of
functions with internal linkage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68510
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 7 Apr 2009 05:33:18 +0000 (05:33 +0000)]
Add test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68505
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 7 Apr 2009 05:25:24 +0000 (05:25 +0000)]
Remove hack from LiveVariables analysis where variables whose address are taken
are considered 'live'. This hack isn't needed anymore because we have a
separation in the path-sensitive analyzer between variable names and bindings;
the analyzer can continue to reason about the storage of a variable after its
name is no longer directly referenced. Now the live variables analysis literally means "is this name live".
Along this line, update the dead stores checker to explicitly look for variables
whose values have escaped.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68504
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 7 Apr 2009 05:12:42 +0000 (05:12 +0000)]
define __va_copy unconditionally, but va_copy only in c99 or non-ansi mode.
Fixes rdar://
6759546 , some code that actually used __va_copy because they
thought it was "more portable".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68503
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 7 Apr 2009 05:07:44 +0000 (05:07 +0000)]
Remove GetLeakNode. This isn't the right approach.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68502
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 7 Apr 2009 04:54:31 +0000 (04:54 +0000)]
Remove period.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68497
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 7 Apr 2009 04:54:20 +0000 (04:54 +0000)]
Eagerly compute the leak location when a leak occurs at the end of a path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68496
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 7 Apr 2009 04:53:35 +0000 (04:53 +0000)]
Removed some commented code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68495
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 7 Apr 2009 04:48:21 +0000 (04:48 +0000)]
The __weak and __strong defines are common to all darwin targets
and are even set in C mode. As such, move them to Targets.cpp.
__OBJC_GC__ is also darwin specific, but seems reasonable to always
define it when in objc-gc mode.
This fixes rdar://
6761450
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68494
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 7 Apr 2009 04:26:02 +0000 (04:26 +0000)]
Remove hack support for @try...@finally in source-level CFGs. The current hack
had too many false positives in the analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68492
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 7 Apr 2009 02:59:27 +0000 (02:59 +0000)]
Driver: More verbosity reduction.
- Ignore some more -W options and -[fm] options which we can somewhat
safely ignore.
- Recognize that -W is an alias for -Wextra
W: -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wfour-char-constants -Winit-self -Wmissing-format-attribute -Wno-#warnings -Wno-comment -Wno-long-long -Wno-variadic-macros -Wold-style-definition -Wstrict-prototypes -Wunused-parameter
f: -fconstant-cfstrings -fdollars-in-identifiers -finline -finline-functions -fno-inline -fno-keep-inline-functions -fno-strict-aliasing -fobjc-atdefs -fobjc-call-cxx-cdtors -fobjc-new-property -fstack-protector
m: -mconstant-cfstrings -mfix-and-continue
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68487
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 7 Apr 2009 02:31:44 +0000 (02:31 +0000)]
Fix test (triple wasn't passed correctly, the driver doesn't accept
-mtriple).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68484
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 7 Apr 2009 01:34:17 +0000 (01:34 +0000)]
PathDiagnostic generation: experiment with avoiding generation of control-flow
pieces between block entrance and block end unless necessary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68483
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 7 Apr 2009 00:55:51 +0000 (00:55 +0000)]
Implement __sync_{add,sub,and,or,xor}_and_fetch and
__sync_bool_compare_and_swap.
- <rdar://problem/
6762223 > [sema/irgen] support
__sync_bool_compare_and_swap and __sync_add_and_fetch
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68482
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 7 Apr 2009 00:38:22 +0000 (00:38 +0000)]
Remove a FIXME, the driver handles -O4.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68481
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 7 Apr 2009 00:20:24 +0000 (00:20 +0000)]
Use the new getFunctionInfo that takes a BlockPointerType parameter, and get rid of getBlockFunctionType from CGBlocks.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68478
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 7 Apr 2009 00:12:43 +0000 (00:12 +0000)]
retain/release checker: When hunting for the leak location, don't walk the
ExplodedGraph backwards. That may inadvertently result in reverse control-flow
edges in the PathDiagostic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68477
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 7 Apr 2009 00:11:40 +0000 (00:11 +0000)]
Don't overguard to adding a control-flow piece when "alwaysAdd" is true.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68476
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 6 Apr 2009 23:43:32 +0000 (23:43 +0000)]
Warn instead of error on duplicate protocol definitions.
Be kind to so many projects which are doing this (and be
like gcc).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68474
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 6 Apr 2009 23:06:54 +0000 (23:06 +0000)]
Rewrite control-flow diagnostic generation "extensive" algorithm using "edge
contexts". This allows us to use a stack of contexts to keep track of what control-flow pieces to include when exiting blocks like 'if', 'for', etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68473
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 6 Apr 2009 22:33:35 +0000 (22:33 +0000)]
PathDiagnosticLocation now also wraps Decls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68470
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 6 Apr 2009 22:07:54 +0000 (22:07 +0000)]
Make casting 'super' a deprecated warning (instead of a hard error).
This will simplify clang adoption, and is probably better "etiquette" (since gcc has always accepted this idiom without warning). Once we are over the adoption hurdle, we can turn this into an error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68468
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 6 Apr 2009 21:55:22 +0000 (21:55 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68466
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 6 Apr 2009 18:45:53 +0000 (18:45 +0000)]
Fixed the Fix-It hints for comparison against a string literal. Thanks, Chris!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68454
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 6 Apr 2009 18:30:00 +0000 (18:30 +0000)]
Fixed visibility issues related to objc2's synthesized
ivars.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68453
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 6 Apr 2009 18:05:26 +0000 (18:05 +0000)]
Add a getFunctionInfo that takes a BlockPointerType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68452
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 6 Apr 2009 17:45:20 +0000 (17:45 +0000)]
Simplify C++ member function calls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68451
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 6 Apr 2009 17:37:10 +0000 (17:37 +0000)]
Define __OPTIMIZE__ and __OPTIMIZE_SIZE__ if the -O[12] and -Os flags are passed to the compiler.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68450
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 6 Apr 2009 17:17:55 +0000 (17:17 +0000)]
enable -std=c9x and -std=iso9899:199x, patch by Ed Schouten!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68449
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 6 Apr 2009 17:11:27 +0000 (17:11 +0000)]
Add clang-cc to the xcodeproj file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68448
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 6 Apr 2009 17:07:34 +0000 (17:07 +0000)]
Daniel convinced me that accepting "const va_list" arguments to va_arg is
a really really bad idea. Now that we emit an error about the unpromoted
type, users should be able to understand what is going on.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68447
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 6 Apr 2009 16:59:10 +0000 (16:59 +0000)]
writable property in a category of class's superclass
makes the property writable in the current class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68446
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 6 Apr 2009 16:53:45 +0000 (16:53 +0000)]
Fix a couple of cases where Constant* pointers can dangle in
ObjCNonFragileABITypesHelper by converting them to dynamic
getters. This fixes a crash on rdar://
6757213 . The others
should be converted over as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68445
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 5 Apr 2009 15:49:53 +0000 (15:49 +0000)]
in va_arg diagnostics, print out the unpromoted type. This makes the
diagnostic use the va_list typedef more often, see the difference in the
changed testcase.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68441
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 5 Apr 2009 02:08:28 +0000 (02:08 +0000)]
Fix output of ranges in analyzer plist files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68437
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Sun, 5 Apr 2009 02:04:38 +0000 (02:04 +0000)]
Apply a patch which adds 'OriginalParmVar' to the DeclContextPrinter by Jon
Simons.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68436
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 5 Apr 2009 00:59:53 +0000 (00:59 +0000)]
Add a warning for questionable va_args usage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68435
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 5 Apr 2009 00:52:59 +0000 (00:52 +0000)]
GCC compatibility: gcc allows applying va_args to const
va_lists for some reason. This fixes rdar://
6726818
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68434
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 5 Apr 2009 00:26:41 +0000 (00:26 +0000)]
fix rdar://
6757323 , where an escaped newline in a // comment
was causing the char after the newline to get eaten.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68430
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 4 Apr 2009 20:47:02 +0000 (20:47 +0000)]
Add some basic support for generating C++ member functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68425
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 4 Apr 2009 10:27:50 +0000 (10:27 +0000)]
Extend possible handled regparm(N) value
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68424
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 4 Apr 2009 05:17:38 +0000 (05:17 +0000)]
Driver: Handle -dumpversion, this is used by some configuration
scripts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68418
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 4 Apr 2009 00:55:30 +0000 (00:55 +0000)]
Driver: Handle properly calling dsymutil when source input is
preceeded by a linker input flag.
- <rdar://problem/
6757236 > clang should make a dSYM when going
straight from source to binary
- This still matches gcc, but the right way to solve this would be to
detect the situation we care about (we are compiling from source
and linking in one step), instead of looking at the suffix of the
input file. The Tool doesn't quite have enough information to do
this yet, however.
- Also, find the suffix correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68417
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 4 Apr 2009 00:52:26 +0000 (00:52 +0000)]
Driver: Automatically suppress warnings for duplicate versions of
flags which were used for something.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68416
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 4 Apr 2009 00:49:38 +0000 (00:49 +0000)]
Testcase for regparm codegen
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68415
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 4 Apr 2009 00:49:24 +0000 (00:49 +0000)]
Basic support for regparm codegen
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68414
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 3 Apr 2009 23:38:25 +0000 (23:38 +0000)]
Provide sema proper values of maximal number of arguments passed in registers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68413
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 3 Apr 2009 22:50:24 +0000 (22:50 +0000)]
Add support for calling C++ member functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68412
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 3 Apr 2009 22:48:58 +0000 (22:48 +0000)]
Add a getFunctionInfo that takes a CXXMethodDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68411
91177308 -0d34-0410-b5e6-
96231b3b80d8