]> granicus.if.org Git - clang/log
clang
11 years agoPoint a hyperlink back to where it was before it got reStructured.
Richard Smith [Thu, 13 Dec 2012 07:29:23 +0000 (07:29 +0000)]
Point a hyperlink back to where it was before it got reStructured.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170110 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoubsan: Add -fsanitize=bool and -fsanitize=enum, which check for loads of
Richard Smith [Thu, 13 Dec 2012 07:11:50 +0000 (07:11 +0000)]
ubsan: Add -fsanitize=bool and -fsanitize=enum, which check for loads of
bit-patterns which are not valid values for enumerated or boolean types.
These checks are the ubsan analogue of !range metadata.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170108 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSimplify. No functionality change.
Richard Smith [Thu, 13 Dec 2012 05:41:48 +0000 (05:41 +0000)]
Simplify. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170100 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoInitial support for FreeBSD on ARM.
Rafael Espindola [Thu, 13 Dec 2012 04:17:14 +0000 (04:17 +0000)]
Initial support for FreeBSD on ARM.
Patch by Andrew Turner.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170096 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Generalize ObjCMissingSuperCallChecker.
Jordan Rose [Thu, 13 Dec 2012 03:06:45 +0000 (03:06 +0000)]
[analyzer] Generalize ObjCMissingSuperCallChecker.

We now check a few methods for UIResponder, NSResponder, and NSDocument.

Patch by Julian Mayer!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170089 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUsing CanQualType::getAs<ArrayType> is unsafe; fix the code currently using it,
Eli Friedman [Thu, 13 Dec 2012 01:43:21 +0000 (01:43 +0000)]
Using CanQualType::getAs<ArrayType> is unsafe; fix the code currently using it,
and make sure additional uses don't get introduced.  <rdar://problem/12858424>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170081 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agodocs: More reST conversion.
Sean Silva [Thu, 13 Dec 2012 01:10:46 +0000 (01:10 +0000)]
docs: More reST conversion.

Sorry for the large commit, but it is much faster to convert in batches.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170067 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Fix a self-init checker false positive.
Anna Zaks [Thu, 13 Dec 2012 00:42:19 +0000 (00:42 +0000)]
[analyzer] Fix a self-init checker false positive.

This is a Band-Aid fix to a false positive, where we complain about not
initializing self to [super init], where self is not coming from the
init method, but is coming from the caller to init.

The proper solution would be to associate the self and it's state with
the enclosing init.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170059 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoobjc: DOn't complain if a (SEL) expression is typecast
Fariborz Jahanian [Thu, 13 Dec 2012 00:42:06 +0000 (00:42 +0000)]
objc: DOn't complain if a (SEL) expression is typecast
to (SEL). Fixes // rdar://12859590

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170058 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd missing check for error return from DefaultLvalueConversion. Fixes <rdar://probl...
Eli Friedman [Thu, 13 Dec 2012 00:37:17 +0000 (00:37 +0000)]
Add missing check for error return from DefaultLvalueConversion.  Fixes <rdar://problem/12857416>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170056 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMore hacking on mapDiagnosticRanges to make it handle more cases.
Eli Friedman [Thu, 13 Dec 2012 00:14:59 +0000 (00:14 +0000)]
More hacking on mapDiagnosticRanges to make it handle more cases.
This still isn't quite right, but it fixes a crash.

I factored out findCommonParent because we need it on the result of
getImmediateExpansionRange: for a function macro, the beginning
and end of an expansion range can come out of different
macros/macro arguments, which means the resulting range is a complete
mess to handle consistently.

I also made some changes to how findCommonParent works; it works somewhat
better in some cases, and somewhat worse in others, but I think overall
it's a better balance.  I'm coming to the conclusion that mapDiagnosticRanges
isn't using the right algorithm, though: chasing the caret is fundamentally
more complicated than any algorithm which only considers one FileID for the
caret can handle because each SourceLocation doesn't really have a single parent.
We need to follow the same path of choosing expansion locations and spelling
locations which the caret used to come up with the correct range
in the general case.

Fixes <rdar://problem/12847524>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170049 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agodocs: Convert some docs to reST.
Sean Silva [Wed, 12 Dec 2012 23:44:55 +0000 (23:44 +0000)]
docs: Convert some docs to reST.

Converts:
    LanguageExtensions
    LibASTMatchers
    LibTooling
    PCHInternals
    ThreadSanitizer
    Tooling

Patch by Mykhailo Pustovit!
(with minor edits by Dmitri Gribenko and Sean Silva)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170048 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agodocs: Another test commit (sphinx autoupdating).
Daniel Dunbar [Wed, 12 Dec 2012 23:35:03 +0000 (23:35 +0000)]
docs: Another test commit (sphinx autoupdating).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170047 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agodocs: Test commit (sphinx autoupdating).
Daniel Dunbar [Wed, 12 Dec 2012 23:33:24 +0000 (23:33 +0000)]
docs: Test commit (sphinx autoupdating).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170046 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agodocs: Initial Sphinx setup for Clang.
Sean Silva [Wed, 12 Dec 2012 23:02:30 +0000 (23:02 +0000)]
docs: Initial Sphinx setup for Clang.

I don't think this will be visible just yet on <clang.llvm.org/docs/>
since I don't think that the necessary server-side setup has taken
place.

Don't shoot me over the theme. I don't want to duplicate LLVM's theme
into the clang repo at the moment, so I just used one of Sphinx's
default themes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170042 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[arcmt] When capturing ARC errors, have a sanity check to make sure
Argyrios Kyrtzidis [Wed, 12 Dec 2012 22:48:28 +0000 (22:48 +0000)]
[arcmt] When capturing ARC errors, have a sanity check to make sure
the diagnostic has a valid location.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170040 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[objc] For the ARC error that is emitted when a synthesized property implementation
Argyrios Kyrtzidis [Wed, 12 Dec 2012 22:48:25 +0000 (22:48 +0000)]
[objc] For the ARC error that is emitted when a synthesized property implementation
has inconsistent ownership with the backing ivar, point the error location to the
ivar.

Pointing to the ivar (instead of the @synthesize) is better since this is where a fix is needed.
Also provide the location of @synthesize via a note.

This also fixes the problem where an auto-synthesized property would emit an error without
any location.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170039 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[ms-inline asm] Test case for r170037.
Chad Rosier [Wed, 12 Dec 2012 22:46:23 +0000 (22:46 +0000)]
[ms-inline asm] Test case for r170037.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170038 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRewrite calls to bitcast unprototyped functions when emitting a definition.
John McCall [Wed, 12 Dec 2012 22:21:47 +0000 (22:21 +0000)]
Rewrite calls to bitcast unprototyped functions when emitting a definition.

My variadics patch, r169588, changed these calls to typically be
bitcasts rather than calls to a supposedly variadic function.
This totally subverted a hack where we intentionally dropped
excess arguments from such calls in order to appease the inliner
and a "warning" from the optimizer.  This patch extends the hack
to also work with bitcasts, as well as teaching it to rewrite
invokes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170034 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[driver] Don't warn about an unused -flto option.
Chad Rosier [Wed, 12 Dec 2012 20:06:31 +0000 (20:06 +0000)]
[driver] Don't warn about an unused -flto option.
rdar://12851905

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170010 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Don't crash running destructors for multidimensional arrays.
Jordan Rose [Wed, 12 Dec 2012 19:13:44 +0000 (19:13 +0000)]
[analyzer] Don't crash running destructors for multidimensional arrays.

We don't handle array destructors correctly yet, but we now apply the same
hack (explicitly destroy the first element, implicitly invalidate the rest)
for multidimensional arrays that we already use for linear arrays.

<rdar://problem/12858542>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170000 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMarking the objc_autoreleaseReturnValue and objc_retainAutoreleaseReturnValue
Chad Rosier [Wed, 12 Dec 2012 17:52:21 +0000 (17:52 +0000)]
Marking the objc_autoreleaseReturnValue and objc_retainAutoreleaseReturnValue
call sites as tail calls unconditionally.  While it's theoretically true that
this is just an optimization, it's an optimization that we very much want to
happen even at -O0, or else ARC applications become substantially harder to
debug.  See r169796 for the llvm/fast-isel side of things.
rdar://12553082

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169996 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoPR14581: Make SourceLocation::printToString work, or it will always return an empty...
Benjamin Kramer [Wed, 12 Dec 2012 14:17:17 +0000 (14:17 +0000)]
PR14581: Make SourceLocation::printToString work, or it will always return an empty string.

No test case, this is debugging code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169980 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSpeeds up parsing of global declarations in cases where the warning
Manuel Klimek [Wed, 12 Dec 2012 13:26:54 +0000 (13:26 +0000)]
Speeds up parsing of global declarations in cases where the warning
is switched of by about 0.8% (tested with int i<N>).

Additionally, this puts computing the diagnostic class into the hot
path more when parsing, in preparation for upcoming optimizations
in this area.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169976 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoclang/lib/Driver/Driver.cpp: Split COMPILER_PATH according to llvm::sys::PathSeparato...
NAKAMURA Takumi [Wed, 12 Dec 2012 06:22:22 +0000 (06:22 +0000)]
clang/lib/Driver/Driver.cpp: Split COMPILER_PATH according to llvm::sys::PathSeparator, that is ';' in Win32 hosts.

Thanks to Bogon Kim!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169964 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDon't warn about disabled macro expansion if we see the name of a function-like macro...
Richard Smith [Wed, 12 Dec 2012 02:46:14 +0000 (02:46 +0000)]
Don't warn about disabled macro expansion if we see the name of a function-like macro which isn't immediately followed by '('. FreeBSD's stdio.h #defines foo(x) to (foo)(x), apparently.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169960 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[libclang] Make sure tokens from preprocessor directives are annotated as such,
Argyrios Kyrtzidis [Wed, 12 Dec 2012 01:05:25 +0000 (01:05 +0000)]
[libclang] Make sure tokens from preprocessor directives are annotated as such,
even if the directive is inside a declaration.

Fixes rdar://11548788 & http://llvm.org/PR12970

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169949 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix line ending is tests. No functional change.
Richard Trieu [Wed, 12 Dec 2012 00:52:15 +0000 (00:52 +0000)]
Fix line ending is tests.  No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169947 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoclang/test: Suppress two tests on win32 for now, since, not sure, in r169829 to r169831.
NAKAMURA Takumi [Wed, 12 Dec 2012 00:51:38 +0000 (00:51 +0000)]
clang/test: Suppress two tests on win32 for now, since, not sure, in r169829 to r169831.

"ansi-escape-sequences" is easy convenient to exclude win32. Please be patient.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169945 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoTry to fix Win32 failures
Douglas Gregor [Tue, 11 Dec 2012 22:31:46 +0000 (22:31 +0000)]
Try to fix Win32 failures

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169923 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDon't use 'touch' in this test; it may be the cause of Windows-related failures.
Douglas Gregor [Tue, 11 Dec 2012 22:25:26 +0000 (22:25 +0000)]
Don't use 'touch' in this test; it may be the cause of Windows-related failures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169922 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse @import rather than @__experimental_modules_import, since the
Douglas Gregor [Tue, 11 Dec 2012 22:11:52 +0000 (22:11 +0000)]
Use @import rather than @__experimental_modules_import, since the
latter is rather a mess to type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169919 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd SPIR32/SPIR64 targets to Clang
Guy Benyei [Tue, 11 Dec 2012 21:38:14 +0000 (21:38 +0000)]
Add SPIR32/SPIR64 targets to Clang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169917 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd -fslp-vectorize to enable bb-vectorize
Hal Finkel [Tue, 11 Dec 2012 19:59:32 +0000 (19:59 +0000)]
Add -fslp-vectorize to enable bb-vectorize

Add -fslp-vectorize (with -ftree-slp-vectorize as an alias for gcc compatibility)
to provide a way to enable the basic-block vectorization pass. This uses the same
acronym as gcc, superword-level parallelism (SLP), also common in the literature,
to refer to basic-block vectorization.

Nadav suggested this as a follow-up to the adding of -fvectorize.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169909 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoobjective-C blocks: Check for record type when deciding if
Fariborz Jahanian [Tue, 11 Dec 2012 19:58:01 +0000 (19:58 +0000)]
objective-C blocks: Check for record type when deciding if
byref variable requires extended layout info. to prevent
a crash involving arrays declared __block. // rdar://12787751

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169908 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDon't complain about incomplete implementations for methods that are
Douglas Gregor [Tue, 11 Dec 2012 18:53:07 +0000 (18:53 +0000)]
Don't complain about incomplete implementations for methods that are
unavailable due to availability attributes. <rdar://problem/12798237>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169903 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSpeed up looking up static diagnostic infos.
Benjamin Kramer [Tue, 11 Dec 2012 18:00:22 +0000 (18:00 +0000)]
Speed up looking up static diagnostic infos.

Instead of doing a binary search over the whole diagnostic table (which weighs
a whopping 48k on x86_64), use the existing enums to compute the index in the
table. This avoids loading any unneeded data from the table and avoids littering
CPU caches with it. This code is in a hot path for code with many diagnostics.

1% speedup on -fsyntax-only gcc.c, which emits a lot of warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169890 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[driver] Add the -ftree-vectorize flag as a alias of -fvectorize to maintain
Chad Rosier [Tue, 11 Dec 2012 17:46:33 +0000 (17:46 +0000)]
[driver] Add the -ftree-vectorize flag as a alias of -fvectorize to maintain
compatibility with gcc.
rdar://12839978

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169888 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix a copypasto bug. Also rename the parameter in question to not shadow the
Matt Beaumont-Gay [Tue, 11 Dec 2012 17:37:46 +0000 (17:37 +0000)]
Fix a copypasto bug. Also rename the parameter in question to not shadow the
'file' builtin, and fix up a docstring a little.

Hat tip to Sebastian Kreft Carreno at Google for noticing the bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169887 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[driver] Add the -fvectorize flag to enable the loop vectorization passes.
Chad Rosier [Tue, 11 Dec 2012 17:12:28 +0000 (17:12 +0000)]
[driver] Add the -fvectorize flag to enable the loop vectorization passes.
rdar://12839978

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169885 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoStmtDumper coding style changes
Alexander Kornienko [Tue, 11 Dec 2012 15:28:09 +0000 (15:28 +0000)]
StmtDumper coding style changes

Summary:
A few small coding style changes for StmtDumper, including:
- rename Dump* methods to dump*
- uninline some methods
- comment fixes
- whitespace fixes

Please review and commit if okay.

Reviewers: alexfh

Reviewed By: alexfh

CC: cfe-commits, alexfh, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D190

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169866 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRename StmtDumper::DumpSubTree() to dumpStmt()
Alexander Kornienko [Tue, 11 Dec 2012 15:20:44 +0000 (15:20 +0000)]
Rename StmtDumper::DumpSubTree() to dumpStmt()

Summary:
Also rename DumpDeclarator() to dumpDecl(). Once Decl dumping is added, these will be the two main methods of the class, so this is just for consistency in naming.

There was a DumpStmt() method already, but there was no point in having it, so I have merged it into VisitStmt(). Similarly, DumpExpr() is merged into VisitExpr().

Reviewers: alexfh

Reviewed By: alexfh

CC: cfe-commits, alexfh
Differential Revision: http://llvm-reviews.chandlerc.com/D156

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169865 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoExtend stat query APIs to explicitly specify if the query is for
Argyrios Kyrtzidis [Tue, 11 Dec 2012 07:48:23 +0000 (07:48 +0000)]
Extend stat query APIs to explicitly specify if the query is for
a file or directory, allowing just a stat call if a file descriptor
is not needed.

Doing just 'stat' is faster than 'open/fstat/close'.
This has the effect of cutting down system time for validating the input files of a PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169831 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[PCH] Remove redundant stat call when validating the input files.
Argyrios Kyrtzidis [Tue, 11 Dec 2012 07:48:14 +0000 (07:48 +0000)]
[PCH] Remove redundant stat call when validating the input files.

This became redundant after we removed the stat cache.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169830 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[PCH] When writing out the list of input files, avoid emitting duplicate
Argyrios Kyrtzidis [Tue, 11 Dec 2012 07:48:08 +0000 (07:48 +0000)]
[PCH] When writing out the list of input files, avoid emitting duplicate
entries of the same file.

This can happen because the file was "included" multiple times and is
referenced by multiple SLocEntries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169829 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoclang/test/Driver/linker-opts.c: Fix XFAIL that I removed win32.
NAKAMURA Takumi [Tue, 11 Dec 2012 07:23:52 +0000 (07:23 +0000)]
clang/test/Driver/linker-opts.c: Fix XFAIL that I removed win32.

Sorry for my 3rd commit :(

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169827 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoclang/test/Driver/debug-options-as.c: Fixup not to use prefix=S. I didn't know "REQUI...
NAKAMURA Takumi [Tue, 11 Dec 2012 07:16:15 +0000 (07:16 +0000)]
clang/test/Driver/debug-options-as.c: Fixup not to use prefix=S. I didn't know "REQUIRES:" would match --check-prefix=S ...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169826 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoclang/test/Driver: Introduce the feature "clang-driver", set if gcc driver is not...
NAKAMURA Takumi [Tue, 11 Dec 2012 07:06:09 +0000 (07:06 +0000)]
clang/test/Driver: Introduce the feature "clang-driver", set if gcc driver is not used.

It is not set at targetting cygming. See PR12920.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169824 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoBackendUtil.cpp: Add #include "llvm/TargetTransformInfo.h"
NAKAMURA Takumi [Tue, 11 Dec 2012 05:53:24 +0000 (05:53 +0000)]
BackendUtil.cpp: Add #include "llvm/TargetTransformInfo.h"

llvm/Target/TargetMachine.h will not provide "llvm/TargetTransformInfo.h" any more.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169816 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd tests for a corner case of when to relax all instructions:
Rafael Espindola [Tue, 11 Dec 2012 05:52:24 +0000 (05:52 +0000)]
Add tests for a corner case of when to relax all instructions:

We don't want to relax all instructions in

$ clang -c test.s

since most users don't pass -O when using the driver to assemble.

On the other hand, -save-temps should not change the output unnecessary, so in

$ clang -c test.c -save-temps

we should relax all instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169815 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoPR14558: Compute triviality of special members (etc) at the end of the class
Richard Smith [Tue, 11 Dec 2012 01:14:52 +0000 (01:14 +0000)]
PR14558: Compute triviality of special members (etc) at the end of the class
definition, rather than at the end of the definition of the set of nested
classes. We still defer checking of the user-specified exception specification
to the end of the nesting -- we can't check that until we've parsed the
in-class initializers for non-static data members.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169805 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Don't generate a summary for "freeWhenDone" if method is
Anna Zaks [Tue, 11 Dec 2012 00:17:53 +0000 (00:17 +0000)]
[analyzer] Don't generate a summary for "freeWhenDone" if method is
inlined.

Fixes a false positive that occurs if a user writes their own
initWithBytesNoCopy:freeWhenDone wrapper.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169795 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove until I can fix this.
Bill Wendling [Mon, 10 Dec 2012 22:10:53 +0000 (22:10 +0000)]
Remove until I can fix this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169778 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd support to Darwin for the -export_dynamic' flag to the linker.
Bill Wendling [Mon, 10 Dec 2012 21:48:41 +0000 (21:48 +0000)]
Add support to Darwin for the -export_dynamic' flag to the linker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169775 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse correct flags for this test.
Bill Wendling [Mon, 10 Dec 2012 21:15:22 +0000 (21:15 +0000)]
Use correct flags for this test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169768 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFixup test case from r169755. These are driver options, not frontend options.
Chad Rosier [Mon, 10 Dec 2012 20:16:17 +0000 (20:16 +0000)]
Fixup test case from r169755.  These are driver options, not frontend options.
Also, add the -S option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169763 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoReturn true from HeaderSearch::isFileMultipleIncludeGuarded if the file
Argyrios Kyrtzidis [Mon, 10 Dec 2012 20:08:37 +0000 (20:08 +0000)]
Return true from HeaderSearch::isFileMultipleIncludeGuarded if the file
was #import'ed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169761 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSpecify if `-mno-red-zone' was used when creating the GCOV instrucmentation pass.
Bill Wendling [Mon, 10 Dec 2012 19:47:53 +0000 (19:47 +0000)]
Specify if `-mno-red-zone' was used when creating the GCOV instrucmentation pass.

This prevents the functions generated by that pass from using the red zone.
<rdar://problem/12843084>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169755 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAddi formatting tests for pointer template parameters.
Daniel Jasper [Mon, 10 Dec 2012 18:59:13 +0000 (18:59 +0000)]
Addi formatting tests for pointer template parameters.

Fix spacing before ",".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169746 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove unneeded typedef and volatile
Michael Ilseman [Mon, 10 Dec 2012 18:48:08 +0000 (18:48 +0000)]
Remove unneeded typedef and volatile

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169743 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoClang-format: error recovery for access specifiers
Alexander Kornienko [Mon, 10 Dec 2012 16:34:48 +0000 (16:34 +0000)]
Clang-format: error recovery for access specifiers

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D198

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169738 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoClarifying comments for the MatchFinder and matchesNames matcher.
Manuel Klimek [Mon, 10 Dec 2012 16:13:06 +0000 (16:13 +0000)]
Clarifying comments for the MatchFinder and matchesNames matcher.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169737 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdding tests since when I was asked whether this works I wasn't
Manuel Klimek [Mon, 10 Dec 2012 07:08:53 +0000 (07:08 +0000)]
Adding tests since when I was asked whether this works I wasn't
100% sure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169725 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUnbreak the clang build after r169712.
Benjamin Kramer [Sun, 9 Dec 2012 21:58:24 +0000 (21:58 +0000)]
Unbreak the clang build after r169712.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169713 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoVirtual method overrides can no longer have mismatched calling conventions. This...
Aaron Ballman [Sun, 9 Dec 2012 17:45:41 +0000 (17:45 +0000)]
Virtual method overrides can no longer have mismatched calling conventions.  This fixes PR14339.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169705 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd a triple to this test. It depends on little-endian bitfield layout.
Chandler Carruth [Sun, 9 Dec 2012 10:39:18 +0000 (10:39 +0000)]
Add a triple to this test. It depends on little-endian bitfield layout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169696 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoCleanup and fix an assert that was mis-firing.
Chandler Carruth [Sun, 9 Dec 2012 10:33:27 +0000 (10:33 +0000)]
Cleanup and fix an assert that was mis-firing.

Note that there is no test suite update. This was found by a couple of
tests failing when the test suite was run on a powerpc64 host (thanks
Roman!). The tests don't specify a triple, which might seem surprising
for a codegen test. But in fact, these tests don't even inspect their
output. Not at all. I could add a bunch of triples to these tests so
that we'd get the test coverage for normal builds, but really someone
needs to go through and add actual *tests* to these tests. =[ The ones
in question are:

  test/CodeGen/bitfield-init.c
  test/CodeGen/union.c

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169694 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd a test case that I've been using to clarify the bitfield layout for
Chandler Carruth [Sun, 9 Dec 2012 10:08:22 +0000 (10:08 +0000)]
Add a test case that I've been using to clarify the bitfield layout for
both LE and BE targets.

AFAICT, Clang get's this correct for PPC64. I've compared it to GCC 4.8
output for PPC64 (thanks Roman!) and to my limited ability to read power
assembly, it looks functionally equivalent. It would be really good to
fill in the assertions on this test case for x86-32, PPC32, ARM, etc.,
but I've reached the limit of my time and energy... Hopefully other
folks can chip in as it would be good to have this in place to test any
subsequent changes.

To those who care about PPC64 performance, a side note: there is some
*obnoxiously* bad code generated for these test cases. It would be worth
someone's time to sit down and teach the PPC backend to pattern match
these IR constructs better. It appears that things like '(shr %foo,
<imm>)' turn into 'rldicl R, R, 64-<imm>, <imm>' or some such. They
don't even get combined with other 'rldicl' instructions *immediately
adjacent*. I'll add a couple of these patterns to the README, but
I think it would be better to look at all the patterns produced by this
and other bitfield access code, and systematically build up a collection
of patterns that efficiently reduce them to the minimal code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169693 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix the bitfield record layout in codegen for big endian targets.
Chandler Carruth [Sun, 9 Dec 2012 07:26:04 +0000 (07:26 +0000)]
Fix the bitfield record layout in codegen for big endian targets.

This was an egregious bug due to the several iterations of refactorings
that took place. Size no longer meant what it original did by the time
I finished, but this line of code never got updated. Unfortunately we
had essentially zero tests for this in the regression test suite. =[

I've added a PPC64 run over the bitfield test case I've been primarily
using. I'm still looking at adding more tests and making sure this is
the *correct* bitfield access code on PPC64 linux, but it looks pretty
close to me, and it is *worlds* better than before this patch as it no
longer asserts! =] More commits to follow with at least additional tests
and maybe more fixes.

Sorry for the long breakage due to this....

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169691 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix overload resolution for the initialization of a multi-dimensional
Richard Smith [Sun, 9 Dec 2012 06:48:56 +0000 (06:48 +0000)]
Fix overload resolution for the initialization of a multi-dimensional
array from a braced-init-list. There seems to be a core wording wart
here (it suggests we should be testing whether the elements of the init
list are implicitly convertible to the array element type, not whether
there is an implicit conversion sequence) but our prior behavior appears
to be a bug, not a deliberate effort to implement the standard as written.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169690 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoPR14550: If a system header contains a bogus constexpr function definition,
Richard Smith [Sun, 9 Dec 2012 05:55:43 +0000 (05:55 +0000)]
PR14550: If a system header contains a bogus constexpr function definition,
don't mark the function as invalid, since we suppress the error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169689 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoPR14549. Don't assert if we see an incomplete decltype specifier at the end of the...
Richard Smith [Sun, 9 Dec 2012 04:17:57 +0000 (04:17 +0000)]
PR14549. Don't assert if we see an incomplete decltype specifier at the end of the file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169688 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoEscape % in the TextDiagnosticBuffer so they aren't interpreted twice when fed into...
Benjamin Kramer [Sat, 8 Dec 2012 12:42:30 +0000 (12:42 +0000)]
Escape % in the TextDiagnosticBuffer so they aren't interpreted twice when fed into the diagnostic formatting machinery again.

Fixes PR14543.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169677 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agolong double should be 64 bits on FreeBSD/MIPS64. It possibly should be on
David Chisnall [Sat, 8 Dec 2012 09:06:08 +0000 (09:06 +0000)]
long double should be 64 bits on FreeBSD/MIPS64.  It possibly should be on
Linux too, as I think we inherited it from there.  The ABI spec says 128-bit,
although I think SGI's compiler on IRIX may be the only thing ever to support
this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169674 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFinish implementing 'selected constructor' rules for triviality in C++11. In
Richard Smith [Sat, 8 Dec 2012 08:32:28 +0000 (08:32 +0000)]
Finish implementing 'selected constructor' rules for triviality in C++11. In
the cases where we can't determine whether special members would be trivial
while building the class, we eagerly declare those special members. The impact
of this is bounded, since it does not trigger implicit declarations of special
members in classes which merely *use* those classes.

In order to determine whether we need to apply this rule, we also need to
eagerly declare move operations and destructors in cases where they might be
deleted. If a move operation were supposed to be deleted, it would instead
be suppressed, and we could need overload resolution to determine if we fall
back to a trivial copy operation. If a destructor were implicitly deleted,
it would cause the move constructor of any derived classes to be suppressed.

As discussed on cxx-abi-dev, C++11's selected constructor rules are also
retroactively applied as a defect resolution in C++03 mode, in order to
identify that class B has a non-trivial copy constructor (since it calls
A's constructor template, not A's copy constructor):

struct A { template<typename T> A(T &); };
struct B { mutable A a; };

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169673 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove some remnants of the assumption that there is at most one of each
Richard Smith [Sat, 8 Dec 2012 04:10:18 +0000 (04:10 +0000)]
Remove some remnants of the assumption that there is at most one of each
flavour of special member.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169670 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoThread-safety analysis: check member access on guarded non-primitive types.
DeLesley Hutchins [Sat, 8 Dec 2012 03:46:30 +0000 (03:46 +0000)]
Thread-safety analysis: check member access on guarded non-primitive types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169669 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoProperly compute triviality for explicitly-defaulted or deleted special members.
Richard Smith [Sat, 8 Dec 2012 02:53:02 +0000 (02:53 +0000)]
Properly compute triviality for explicitly-defaulted or deleted special members.
Remove pre-standard restriction on explicitly-defaulted copy constructors with
'incorrect' parameter types, and instead just make those special members
non-trivial as the standard requires.

This required making CXXRecordDecl correctly handle classes which have both a
trivial and a non-trivial special member of the same kind.

This also fixes PR13217 by reimplementing DiagnoseNontrivial in terms of the
new triviality computation technology.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169667 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[libclang] Resolve a cursor that points to a macro name inside a #ifdef/#ifndef
Argyrios Kyrtzidis [Sat, 8 Dec 2012 02:21:17 +0000 (02:21 +0000)]
[libclang] Resolve a cursor that points to a macro name inside a #ifdef/#ifndef
directive as a macro expansion.

This is more of a "macro reference" than a macro expansion but it's close enough
for libclang's purposes. If it causes issues we can revisit and introduce a new
kind of cursor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169666 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[Preprocessor] Enhance Ifdef/Ifndef/Defined preprocessor callbacks to also pass
Argyrios Kyrtzidis [Sat, 8 Dec 2012 02:21:11 +0000 (02:21 +0000)]
[Preprocessor] Enhance Ifdef/Ifndef/Defined preprocessor callbacks to also pass
a MacroInfo object if the identifier was a macro name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169665 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd a FIXME.
Richard Smith [Sat, 8 Dec 2012 02:13:02 +0000 (02:13 +0000)]
Add a FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169664 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoImplement C++03 [dcl.init]p5's checking for value-initialization of references
Richard Smith [Sat, 8 Dec 2012 02:01:17 +0000 (02:01 +0000)]
Implement C++03 [dcl.init]p5's checking for value-initialization of references
properly, rather than faking it up by pretending that a reference member makes
the default constructor non-trivial. That leads to rejects-valids when putting
such types inside unions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169662 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoCurrently when AST record layouts are dumped with -fdump-record-layouts, the
Eli Bendersky [Sat, 8 Dec 2012 00:07:24 +0000 (00:07 +0000)]
Currently when AST record layouts are dumped with -fdump-record-layouts, the
following:

sizeof=132, dsize=132, align=4
nvsize=132, nvalign=4

Is not indented, so when classes are nested there is no way to know to
which class it belongs.

Fix this problem by indenting the size summary properly for each class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169654 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agos/AttrListPtr/AttributeSet/g to better label what this class is going to be in the...
Bill Wendling [Fri, 7 Dec 2012 23:17:26 +0000 (23:17 +0000)]
s/AttrListPtr/AttributeSet/g to better label what this class is going to be in the near future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169652 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix analysis based warnings so that all warnings are emitted when compiling
DeLesley Hutchins [Fri, 7 Dec 2012 22:53:48 +0000 (22:53 +0000)]
Fix analysis based warnings so that all warnings are emitted when compiling
with -Werror.  Previously, compiling with -Werror would emit only the first
warning in a compilation unit, because clang assumes that once an error occurs,
further analysis is unlikely to return valid results.  However, warnings that
have been upgraded to errors should not be treated as "errors" in this sense.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169649 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAppease -Wnon-virtual-dtor
Matt Beaumont-Gay [Fri, 7 Dec 2012 22:49:27 +0000 (22:49 +0000)]
Appease -Wnon-virtual-dtor

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169648 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[libclang] Declarations inside anonymous namespaces have internal linkage so
Argyrios Kyrtzidis [Fri, 7 Dec 2012 22:41:46 +0000 (22:41 +0000)]
[libclang] Declarations inside anonymous namespaces have internal linkage so
their USR should contain a location.

This uniques them from other declarations with the same name but in different translation units.
rdar://10546541

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169647 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Rename the option help to reflect better what it does.
Anna Zaks [Fri, 7 Dec 2012 21:51:50 +0000 (21:51 +0000)]
[analyzer] Rename the option help to reflect better what it does.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169640 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Optimization heuristic: do not reanalyze every ObjC method as
Anna Zaks [Fri, 7 Dec 2012 21:51:47 +0000 (21:51 +0000)]
[analyzer] Optimization heuristic: do not reanalyze every ObjC method as
top level.

This heuristic is already turned on for non-ObjC methods
(inlining-mode=noredundancy). If a method has been previously analyzed,
while being inlined inside of another method, do not reanalyze it as top
level.

This commit applies it to ObjCMethods as well. The main caveat here is
that to catch the retain release errors, we are still going to reanalyze
all the ObjC methods but without inlining turned on.

Gives 21% performance increase on one heavy ObjC benchmark, which
suffered large performance regressions due to ObjC inlining.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169639 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAST matcher tutorial (Part I)
Daniel Jasper [Fri, 7 Dec 2012 20:34:49 +0000 (20:34 +0000)]
AST matcher tutorial (Part I)

This an AST matcher tutorial based on Sam Panzer's document
(https://docs.google.com/a/google.com/document/d/1oTkVLhCdRJUEH1_LDaQdXqe8-aOqT5GLDL9e4MhoFF8/edit).

Checking in now although some parts might be a bit rough so others can
help improving it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169632 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Fix r168019 to work with unpruned paths as well.
Jordan Rose [Fri, 7 Dec 2012 19:56:29 +0000 (19:56 +0000)]
[analyzer] Fix r168019 to work with unpruned paths as well.

This is the case where the analyzer tries to print out source locations
for code within a synthesized function body, which of course does not have
a valid source location. The previous fix attempted to do this during
diagnostic path pruning, but some diagnostics have pruning disabled, and
so any diagnostic with a path that goes through a synthesized body will
either hit an assertion or emit invalid output.

<rdar://problem/12657843> (again)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169631 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoReduce conversions between Store <-> ImmutableMapRef in RegionStore.
Ted Kremenek [Fri, 7 Dec 2012 19:54:25 +0000 (19:54 +0000)]
Reduce conversions between Store <-> ImmutableMapRef in RegionStore.

This reduces canonicalization of ImmutableMaps.  This reduces analysis time
of one heavy Objective-C file by another 1%.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169630 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd helper method to convert from a RegionStoreRefBindings to a Store.
Ted Kremenek [Fri, 7 Dec 2012 18:32:08 +0000 (18:32 +0000)]
Add helper method to convert from a RegionStoreRefBindings to a Store.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169622 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoHexagon TC: forward appropriate args to assembler
Matthew Curtis [Fri, 7 Dec 2012 17:23:04 +0000 (17:23 +0000)]
Hexagon TC: forward appropriate args to assembler

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169611 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDriver/ToolChains.cpp: Add the name CentOS5 32bit gcc44 (aka i386-redhat-linux6E).
NAKAMURA Takumi [Fri, 7 Dec 2012 17:13:18 +0000 (17:13 +0000)]
Driver/ToolChains.cpp: Add the name CentOS5 32bit gcc44 (aka i386-redhat-linux6E).

Thanks to Bruce Stephens.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169610 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoClang-format: extracted FormatTokenSource from UnwrappedLineParser.
Alexander Kornienko [Fri, 7 Dec 2012 16:15:44 +0000 (16:15 +0000)]
Clang-format: extracted FormatTokenSource from UnwrappedLineParser.

Summary: FormatTokenLexer is here, FormatTokenBuffer is on the way. This will allow to re-parse unwrapped lines when needed.

Reviewers: djasper, klimek

Reviewed By: klimek

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D186

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169605 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoHexagon TC: add cc1 defaults for hexagon-gcc
Matthew Curtis [Fri, 7 Dec 2012 13:52:44 +0000 (13:52 +0000)]
Hexagon TC: add cc1 defaults for hexagon-gcc
 compatibility

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169599 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSmall tweaks to clang-format.
Daniel Jasper [Fri, 7 Dec 2012 09:52:15 +0000 (09:52 +0000)]
Small tweaks to clang-format.

Now not joining keywords with '::' and not putting a space between
a pointer pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169594 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoCache queries to lookupPrivateMethod() within ObjCMethodCall::getRuntimeDefinition().
Ted Kremenek [Fri, 7 Dec 2012 07:30:19 +0000 (07:30 +0000)]
Cache queries to lookupPrivateMethod() within ObjCMethodCall::getRuntimeDefinition().

The same queries can happen thousands of times.  This reduces the analysis
time on one heavy Objective-C file by 2.4%.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169589 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix the required args count for variadic blocks.
John McCall [Fri, 7 Dec 2012 07:03:17 +0000 (07:03 +0000)]
Fix the required args count for variadic blocks.

We were emitting calls to blocks as if all arguments were
required --- i.e. with signature (A,B,C,D,...) rather than
(A,B,...).  This patch fixes that and accounts for the
implicit block-context argument as a required argument.
In addition, this patch changes the function type under which
we call unprototyped functions on platforms like x86-64 that
guarantee compatibility of variadic functions with unprototyped
function types;  previously we would always call such functions
under the LLVM type T (...)*, but now we will call them under
the type T (A,B,C,D,...)*.  This last change should have no
material effect except for making the type conventions more
explicit;  it was a side-effect of the most convenient implementation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169588 91177308-0d34-0410-b5e6-96231b3b80d8