Daniel Dunbar
0b42659e76
Fix test for Win32.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108806 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 04:06:54 +00:00
Zhongxing Xu
bc5495b666
Constify.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108804 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 02:56:49 +00:00
Zhongxing Xu
bf9c2b2e93
remove const_cast.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108803 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 02:53:15 +00:00
Daniel Dunbar
e5d69670b6
Driver: Switch to using a SmallVector instead of std::vector, and stop
...
accessing outside the range of the vector (which always asserts on Win32).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108802 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 02:47:40 +00:00
Zhongxing Xu
ce2bc7e3ce
constify.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108801 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 02:46:11 +00:00
Zhongxing Xu
3992a50eea
Constify.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108800 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 02:41:28 +00:00
Zhongxing Xu
a02d893f15
Add comments.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108795 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 02:14:22 +00:00
Stuart Hastings
257d1d3602
Correct line info for declarations/definitions. Radar 8063111.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108785 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 23:56:31 +00:00
Jim Grosbach
38d247996f
and revert the related tests, too
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108766 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 22:53:57 +00:00
Jim Grosbach
af0bbea0d1
Temporarily revert. Some odd internal breakage is likely related.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108764 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 22:43:34 +00:00
Sebastian Redl
2f82c5855e
Remove PCHReader::getStream(), it was unused. Inline PCHReader::getDelsCursor() into its sole caller and remove it. This reduces the attack surface of multiple PCH files towards code outside the PCH implementation.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108763 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 22:38:35 +00:00
Sebastian Redl
2da08f9d8d
Promote IdentifierOffsets to per-file data.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108762 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 22:28:42 +00:00
Sebastian Redl
12d6da0675
Promote DeclOffsets and TypeOffsets to per-file data.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108760 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 22:06:55 +00:00
Fariborz Jahanian
a8f8dac6a2
Patch to type match comparing Objective-C Classes which implement
...
protocols (Radar 8191774).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108758 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 22:02:22 +00:00
Ted Kremenek
baa400654b
Don't warn when a '%%' or '%*d' (scanf) is used in a format string with positional arguments, since
...
these don't actually consume an argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108757 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 22:01:06 +00:00
Douglas Gregor
abc563f554
Introduce a new libclang API, clang_reparseTranslationUnit(), which
...
reparses an already-parsed translation unit. At the moment it's just a
convenience function, but we hope to use it for performance
optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108756 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 21:46:24 +00:00
Jim Grosbach
a7765a6857
Update tests for r108749
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108754 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 21:39:14 +00:00
Ted Kremenek
c09b6a59e0
Hook up 'invalid conversion' warning for scanf format strings.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108750 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 21:25:57 +00:00
Jim Grosbach
2543dbb9d0
Put ObjC method names, method types and class names in separate string literal
...
sections. rdar://8207705
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108749 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 20:54:43 +00:00
Sebastian Redl
93fb9ed056
Promote the identifier table to per-file data. Also, if a CHAINED_METADATA record exists, it has to be the first thing in the PCH file.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108748 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 20:52:06 +00:00
Ted Kremenek
1348af6b06
Put warnings in the 'Deprecated' group into a 'Deprecations' DiagCategory. Fixes <rdar://problem/8203182>.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108743 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 20:20:06 +00:00
Ted Kremenek
be86ecc827
Add missing conversion specifier parsing for 'u', 'x', 'o', and 's'. Fixes <rdar://problem/8204052>.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108742 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 19:47:40 +00:00
Daniel Dunbar
5314e44863
Driver: Make -fnext-runtime the default when rewriting Objective-C.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108741 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 19:44:22 +00:00
Daniel Dunbar
6c57322d0f
IRgen: Add a test case I forgot to commit at some point.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108713 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 17:11:38 +00:00
Daniel Dunbar
60baf0f6d5
Driver/Darwin: Add deployment target after doing argument translation, so that
...
-mmacosx-version-min works inside a -Xarch_ flag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108712 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 17:11:36 +00:00
Daniel Dunbar
c0e665eb70
Driver: Factor out Darwin::AddDeploymentTarget.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108711 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 17:11:33 +00:00
Douglas Gregor
9a90d79eb4
Remove unused location-to-AST-node resolver. libclang's implementation supercedes it
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108708 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 16:18:30 +00:00
Fariborz Jahanian
84ef4b20b3
Categories cannot synthesize property ivars,
...
and a minor cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108707 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 16:14:33 +00:00
Rafael Espindola
8a1af325b4
Implement support for reading arguments specified in a file with @file. If
...
there is no file named "file", keep the @file option unchanged.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108697 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 15:20:12 +00:00
Zhongxing Xu
7a42054b18
Fix construction of AnalysisContext. Thanks Daniel.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108694 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 13:16:50 +00:00
Benjamin Kramer
2b02f7a051
Adjust test for float printing differences. Windows uses three digits for the exponent, everyone else two.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108693 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 11:48:10 +00:00
Argyrios Kyrtzidis
e3041be307
Fix http://llvm.org/PR7660
...
A ParmVarDecl instantiated from a FunctionProtoType may have Record as DeclContext,
in which case isStaticDataMember() will erroneously return true.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108692 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 10:14:41 +00:00
Daniel Dunbar
6658874a26
Revert r108672, "Implement support for reading arguments specified in a file
...
with @file.", it doesn't correctly handle cases where arguments starting with
'@' are passed to other command line arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108686 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 07:21:12 +00:00
Chris Lattner
dfe503e4c2
tidy up comment.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108676 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 05:07:24 +00:00
Rafael Espindola
1c2ab11bc5
Implement support for reading arguments specified in a file with @file.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108672 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 03:08:01 +00:00
Zhongxing Xu
c6a36ff1d5
fix test case.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108671 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 02:06:14 +00:00
Zhongxing Xu
bc46c6b9c5
remove CallInliner.cpp.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108670 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 01:55:38 +00:00
Zhongxing Xu
9843ba9be3
Add double close check to StreamChecker. Patch by Lei Zhang.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108669 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 01:52:29 +00:00
Zhongxing Xu
c6238d2786
Reapply r108617.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108668 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 01:31:21 +00:00
Daniel Dunbar
0bbad519aa
Driver: Change the driver to take the path to the main executable, instead of
...
taking it in pieces.
- Fixes a problem where the Clang executable path was not initialized properly
on Win32, because sys::Path::getBasename() doesn't do what I always think it
does. Imagine that, a sys::Path interface that is confusing!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108667 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 00:44:04 +00:00
Daniel Dunbar
e9122a36c4
Update for LLVM API change.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108665 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 00:33:53 +00:00
Rafael Espindola
06e35d3d02
Refactor the code a bit so that there is only one call to BuildCompilation. The
...
StringPointers vector will also be used in the normal case to handle @file
arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108660 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 22:03:55 +00:00
Daniel Dunbar
a001c1ce5f
Driver: Fix a possible use after free.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108659 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 21:16:15 +00:00
Chandler Carruth
8d13d221cf
Fix a goof in my previous patch -- not all of the builtins return a value, some
...
fixed return types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108657 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 20:54:12 +00:00
Eli Friedman
c00cb64093
Fix mangling for static member variables of classes inside an extern "C"
...
linkage specification. Not sure if this is the ideal fix, but I'm reasonably
sure it's correct vs. gcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108656 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 20:49:59 +00:00
Chris Lattner
ea9799c748
daniel doesn't hate me, he hates macpython 2.5, which
...
is a very reasonable position on life!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108651 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 18:42:35 +00:00
Peter Collingbourne
8a6c0f1a48
When instantiating function definitions set parameter names to those used in template
...
The rationale is that we are copying the entire definition including
parameter names which may differ between the declaration and the
definition.
This is particularly important if any parameters are unnamed in the
declaration, as a DeclRef to an unnamed ParmVarDecl would cause the
pretty printer to produce invalid output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108643 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 16:45:46 +00:00
Douglas Gregor
59f1ed2836
Revert -Wdiscard-qual typo
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108641 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 11:27:38 +00:00
Chandler Carruth
db4325b098
Improve the representation of the atomic builtins in a few ways. First, we make
...
their call expressions synthetically have the "deduced" types based on their
first argument. We only insert conversions in the AST for arguments whose
values require conversion to match the value type expected. This keeps PR7600
closed by maintaining the return type, but avoids assertions due to unexpected
implicit casts making the type unsigned (test case added from Daniel).
The magic is moved into the codegen for the atomic builtin which inserts the
casts as needed at the IR level to raise the type to an integer suitable for
the LLVM intrinsic. This shouldn't cause any real change in functionality, but
now we can make the builtin be more truly polymorphic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108638 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 07:23:17 +00:00
Chris Lattner
9638eef7e3
BUILD_ARCHIVE is the default for libraries, no need to set it.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108633 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 00:14:47 +00:00