]> granicus.if.org Git - clang/log
clang
11 years agoMove the atomics code into its own file.
John McCall [Thu, 7 Mar 2013 21:37:12 +0000 (21:37 +0000)]
Move the atomics code into its own file.

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

11 years agoChange hasAggregateLLVMType, which conflates complex and
John McCall [Thu, 7 Mar 2013 21:37:08 +0000 (21:37 +0000)]
Change hasAggregateLLVMType, which conflates complex and
aggregate types in a profoundly wrong way that has to be
worked around in every call site, to getEvaluationKind,
which classifies and distinguishes between all of these
cases.

Also, normalize the API for loading and storing complexes.

I'm working on a larger patch and wanted to pull these
changes out, but it would have be annoying to detangle
them from each other.

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

11 years agoAdd CharUnits::alignmentAtOffset.
John McCall [Thu, 7 Mar 2013 21:37:02 +0000 (21:37 +0000)]
Add CharUnits::alignmentAtOffset.

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

11 years agoEvaluate compound literals directly into the result aggregate
John McCall [Thu, 7 Mar 2013 21:36:54 +0000 (21:36 +0000)]
Evaluate compound literals directly into the result aggregate
when that aggregate isn't potentially aliased.

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

11 years agoRemove temporary std::vectors that ca be replaced with ArrayRef's magic.
Benjamin Kramer [Thu, 7 Mar 2013 21:18:31 +0000 (21:18 +0000)]
Remove temporary std::vectors that ca be replaced with ArrayRef's magic.

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

11 years agoRemove unncessary whitespace when triggered on empty line.
Daniel Jasper [Thu, 7 Mar 2013 20:50:00 +0000 (20:50 +0000)]
Remove unncessary whitespace when triggered on empty line.

With the cursor located at "I", clang-format would not do anything to:

int a;

   I

  int b;

With this patch, it reduces the number of empty lines as necessary, and
removes unnecessary whitespace. It does not change/reformat "int a;" or
"int b;".

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

11 years agoAdding lvalue and rvalue reference type matchers
Edwin Vane [Thu, 7 Mar 2013 15:44:40 +0000 (15:44 +0000)]
Adding lvalue and rvalue reference type matchers

Updated docs and tests.

Reviewers: klimek, gribozavr

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

11 years agoAdd 'e' to the SPIR data layout - SPIR is little endian for now.
Guy Benyei [Thu, 7 Mar 2013 13:06:10 +0000 (13:06 +0000)]
Add 'e' to the SPIR data layout - SPIR is little endian for now.
Add 32/64 bit specific target defines for SPIR.

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

11 years agoMinor refactor of how we get compilation phases.
Matthew Curtis [Thu, 7 Mar 2013 12:32:26 +0000 (12:32 +0000)]
Minor refactor of how we get compilation phases.

There is now a single function to get the list of phases for a given
output Type.

No functionality change intended.

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

11 years agoFix build with clang, this was supposed to be part of r176617.
Nick Lewycky [Thu, 7 Mar 2013 08:42:27 +0000 (08:42 +0000)]
Fix build with clang, this was supposed to be part of r176617.

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

11 years agoAdd flags for additional control over coverage generation. Pick the version
Nick Lewycky [Thu, 7 Mar 2013 08:28:53 +0000 (08:28 +0000)]
Add flags for additional control over coverage generation. Pick the version
string to be emitted, and two properties about the files themselves.

Use $PWD to absolut-ify the path to the coverage file. Yes, this is what GCC
does. Reverts my own r175706.

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

11 years ago[analyzer] Warn on passing a reference to null pointer as an argument in a call
Anna Zaks [Thu, 7 Mar 2013 03:02:36 +0000 (03:02 +0000)]
[analyzer] Warn on passing a reference to null pointer as an argument in a call

Warn about null pointer dereference earlier when a reference to a null pointer is
passed in a call. The idea is that even though the standard might allow this, reporting
the issue earlier is better for diagnostics (the error is reported closer to the place where
the pointer was set to NULL). This also simplifies analyzer’s diagnostic logic, which has
to track “where the null came from”. As a consequence, some of our null pointer
warning suppression mechanisms started triggering more often.

TODO: Change the name of the file and class to reflect the new check.

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

11 years agoDon't duplicate function names. Thanks to Jordan Rose for pointing it out.
Rafael Espindola [Thu, 7 Mar 2013 02:43:24 +0000 (02:43 +0000)]
Don't duplicate function names. Thanks to Jordan Rose for pointing it out.

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

11 years agoAdd a hasExternalLinkage helper. No functionality change.
Rafael Espindola [Thu, 7 Mar 2013 02:00:27 +0000 (02:00 +0000)]
Add a hasExternalLinkage helper. No functionality change.

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

11 years agoAdd a hasExternalStorageAsWritten helper. No functionality change.
Rafael Espindola [Thu, 7 Mar 2013 01:42:44 +0000 (01:42 +0000)]
Add a hasExternalStorageAsWritten helper. No functionality change.

It is possible that some of the current uses of
"getStorageClassAsWritten() == SC_Extern" should use this but I don't know
enough about SC_PrivateExtern to change and test them.

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

11 years agoFix typo.
Rafael Espindola [Thu, 7 Mar 2013 01:34:57 +0000 (01:34 +0000)]
Fix typo.

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

11 years ago[analyzer] Check for returning null references in ReturnUndefChecker.
Jordan Rose [Thu, 7 Mar 2013 01:23:25 +0000 (01:23 +0000)]
[analyzer] Check for returning null references in ReturnUndefChecker.

Officially in the C++ standard, a null reference cannot exist. However,
it's still very easy to create one:

int &getNullRef() {
  int *p = 0;
  return *p;
}

We already check that binds to reference regions don't create null references.
This patch checks that we don't create null references by returning, either.

<rdar://problem/13364378>

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

11 years ago[analyzer] Clean up a few doc comments for ProgramState and CallEvent.
Jordan Rose [Thu, 7 Mar 2013 01:23:14 +0000 (01:23 +0000)]
[analyzer] Clean up a few doc comments for ProgramState and CallEvent.

No functionality change.

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

11 years agoEnsure that DIType is regenerated after we visit an implementation
Adrian Prantl [Wed, 6 Mar 2013 22:03:30 +0000 (22:03 +0000)]
Ensure that DIType is regenerated after we visit an implementation
that adds ivars to an interface.

Fixes rdar://13175234

This is an update to r176116 that performs a smart caching of interfaces.

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

11 years ago[analyzer] Pass the correct Expr to the bug reporter visitors when dealing with Compo...
Anna Zaks [Wed, 6 Mar 2013 20:26:02 +0000 (20:26 +0000)]
[analyzer] Pass the correct Expr to the bug reporter visitors when dealing with CompoundLiteralExpr

This allows us to trigger the IDC visitor in the added test case.

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

11 years ago[analyzer] IDC: Add config option; perform the idc check on first “null node” rather...
Anna Zaks [Wed, 6 Mar 2013 20:25:59 +0000 (20:25 +0000)]
[analyzer] IDC: Add config option; perform the idc check on first “null node” rather than last “non-null”.

The second modification does not lead to any visible result, but, theoretically, is what we should
have been looking at to begin with since we are checking if the node was assumed to be null in
an inlined function.

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

11 years ago[PCH] When pre-validating the headers from the PCH, only validate non-system headers.
Argyrios Kyrtzidis [Wed, 6 Mar 2013 18:12:50 +0000 (18:12 +0000)]
[PCH] When pre-validating the headers from the PCH, only validate non-system headers.

Stat'ing all the headers from the PCH to make sure they are up-to-date takes significant time.
In a particular source file (whose PCH file included Cocoa.h) from total -fsyntax-only time
12% was just stat calls. Change pre-validation to only check non-system headers.

There are some notable disadvantages:

-If a system header, that is not include-guarded, changes after the PCH was created, we will not
find it in the header info table and we will #import it, effectively #importing it twice, thus
we will emit some error due to a multiple definition and after that the "header was modified" error will likely
be emitted, for example something like:

NSDictionary.h:12:1: error: duplicate interface definition for class 'NSDictionary'
@interface NSDictionary : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
^
NSDictionary.h:12:12: note: previous definition is here
@interface NSDictionary : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
           ^
fatal error: file 'NSDictionary.h' has been modified since the precompiled header was built

Though we get the "header was modified" error, this is a bit confusing.

-Theoretically it is possible that such a system header will cause no errors but it will just cause an
unfortunate semantic change, though I find this rather unlikely.

The advantages:

-Reduces compilation time when using a huge PCH like the Cocoa ones
-System headers change very infrequent and when they do, users/build systems should be able to know that
re-building from scratch is needed.

Addresses rdar://13056262

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

11 years ago[PCH] For HeaderFileInfoTrait, hash the key using size & time of the file.
Argyrios Kyrtzidis [Wed, 6 Mar 2013 18:12:47 +0000 (18:12 +0000)]
[PCH] For HeaderFileInfoTrait, hash the key using size & time of the file.

Previously the hash would be the filename portion of the path, which could be
different for a filename with different case or a symbolic link with a different
name completely.
This did not actually create any issue so far because by validating all headers
in the PCH we created uniqued FileEntries based on inodes, so an #include of
a symbolic link (refering to a file from the PCH) would end up with a FileEntry
with filename same as the one recorded in the PCH.

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

11 years ago[PCH] We don't need to instantiate HeaderFileInfoTrait in ASTReader more than once.
Argyrios Kyrtzidis [Wed, 6 Mar 2013 18:12:44 +0000 (18:12 +0000)]
[PCH] We don't need to instantiate HeaderFileInfoTrait in ASTReader more than once.

We can just re-use the one from HeaderFileInfoLookupTable.

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

11 years ago[PCH] Remove a couple of fields from serialization::reader::HeaderFileInfoTrait that...
Argyrios Kyrtzidis [Wed, 6 Mar 2013 18:12:41 +0000 (18:12 +0000)]
[PCH] Remove a couple of fields from serialization::reader::HeaderFileInfoTrait that are not used for anything.

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

11 years agoSpell Objective-C correctly.
Fariborz Jahanian [Wed, 6 Mar 2013 17:55:30 +0000 (17:55 +0000)]
Spell Objective-C correctly.

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

11 years agosay objective-C in the warning and streamline
Fariborz Jahanian [Wed, 6 Mar 2013 17:36:51 +0000 (17:36 +0000)]
say objective-C in the warning and streamline
several diagnostics into one. // rdar://13094352

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

11 years agoDriver: add support for new style multiarch in Ubuntu 13.04
Dmitri Gribenko [Wed, 6 Mar 2013 17:14:05 +0000 (17:14 +0000)]
Driver: add support for new style multiarch in Ubuntu 13.04

Patch by Sanne Wouda.

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

11 years agoNew ASTMatchers and enhancement to hasOverloadedOperatorName
Edwin Vane [Wed, 6 Mar 2013 17:02:57 +0000 (17:02 +0000)]
New ASTMatchers and enhancement to hasOverloadedOperatorName

Added two new narrowing matchers:
* hasMethod: aplies a matcher to a CXXRecordDecl's methods until a match is made
  or there are no more methods.
* hasCanonicalType: applies a matcher to a QualType's canonicalType.

Enhanced hasOverloadedOperatorName to work on CXXMethodDecl as well as
CXXOperatorCallExpr.

Updated tests and docs.

Reviewers: klimek, gribozavr

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

11 years ago[Sanitize] Don't emit function attribute sanitize_address/thread/memory if the functi...
Alexey Samsonov [Wed, 6 Mar 2013 10:54:18 +0000 (10:54 +0000)]
[Sanitize] Don't emit function attribute sanitize_address/thread/memory if the function is blacklisted.

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

11 years agorevert r176531 due to clan-native-arm fails
Weiming Zhao [Wed, 6 Mar 2013 02:08:54 +0000 (02:08 +0000)]
revert r176531 due to clan-native-arm fails

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

11 years agoPR15390: If a function returns a pointer to a function, that function type
Richard Smith [Wed, 6 Mar 2013 01:37:38 +0000 (01:37 +0000)]
PR15390: If a function returns a pointer to a function, that function type
can't have default arguments even though it's a parameter-declaration-clause in
a function declaration.

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

11 years agoAfter issuing a diagnostic for undefining or redefining a builtin macro,
Richard Smith [Wed, 6 Mar 2013 00:46:00 +0000 (00:46 +0000)]
After issuing a diagnostic for undefining or redefining a builtin macro,
continue parsing the directive rather than silently discarding it.

Allowing undef or redef of __TIME__ and __DATE__ is important to folks
who want stable, reproducible builds.

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

11 years agoobjective-C: don't crash after diagnosing
Fariborz Jahanian [Wed, 6 Mar 2013 00:37:40 +0000 (00:37 +0000)]
objective-C: don't crash after diagnosing
using object subscripting without declaring objectForKeyedSubscript:
// rdar://13333205

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

11 years agoRemove unused static variable.
Douglas Gregor [Tue, 5 Mar 2013 23:59:13 +0000 (23:59 +0000)]
Remove unused static variable.

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

11 years agoPreprocessor: don't keep comments under -traditional-cpp.
Jordan Rose [Tue, 5 Mar 2013 23:54:55 +0000 (23:54 +0000)]
Preprocessor: don't keep comments under -traditional-cpp.

This patch is designed for minimal intrusion into normal preprocessing
and compilation; under -E -traditional-cpp, the lexer will still
generate tok::comment nodes since it is preserving all whitespace, but
the output printer will then throw it away.

<rdar://problem/13338680>

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

11 years agoPR 11326: Lack diagnosic message when ABI conflicts on ARM
Weiming Zhao [Tue, 5 Mar 2013 23:27:21 +0000 (23:27 +0000)]
PR 11326: Lack diagnosic message when ABI conflicts on ARM

When both Triple and -mabi are used, it may result into conflicting ABI value.

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

11 years agofix a missing check in my last patch.
Fariborz Jahanian [Tue, 5 Mar 2013 23:20:29 +0000 (23:20 +0000)]
fix a missing check in my last patch.
// rdar://13094352

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

11 years agoPreprocessor: don't consider // to be a line comment in -E -std=c89 mode.
Jordan Rose [Tue, 5 Mar 2013 22:51:04 +0000 (22:51 +0000)]
Preprocessor: don't consider // to be a line comment in -E -std=c89 mode.

It's beneficial when compiling to treat // as the start of a line
comment even in -std=c89 mode, since it's not valid C code (with a few
rare exceptions) and is usually intended as such. We emit a pedantic
warning and then continue on as if line comments were enabled.
This has been our behavior for quite some time.

However, people use the preprocessor for things besides C source files.
In today's prompting example, the input contains (unquoted) URLs, which
contain // but should still be preserved.

This change instructs the lexer to treat // as a plain token if Clang is
in C90 mode and generating preprocessed output rather than actually compiling.

<rdar://problem/13338743>

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

11 years agodoc. parsing. Improve on diagnostics on my last patch.
Fariborz Jahanian [Tue, 5 Mar 2013 22:46:07 +0000 (22:46 +0000)]
doc. parsing. Improve on diagnostics on my last patch.
// rdar://13094352.

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

11 years agoRemove outdated claim that GCC builds without a C++ compiler from compilers comparison.
Richard Smith [Tue, 5 Mar 2013 21:49:52 +0000 (21:49 +0000)]
Remove outdated claim that GCC builds without a C++ compiler from compilers comparison.

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

11 years agoUse ASTContext::getDeclAlign(<Field Decl>) to get the alignment of the first
Lang Hames [Tue, 5 Mar 2013 20:27:24 +0000 (20:27 +0000)]
Use ASTContext::getDeclAlign(<Field Decl>) to get the alignment of the first
field to be memcpy'd, rather instead of ASTContext::getTypeAlign(<Field Type>).
For packed structs the alignment of a field may be less than the alignment of
the field's type.

<rdar://problem/13338585>

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

11 years ago[libclang] When logging a CXTranslationUnit that came from an AST file, print out...
Argyrios Kyrtzidis [Tue, 5 Mar 2013 20:21:14 +0000 (20:21 +0000)]
[libclang] When logging a CXTranslationUnit that came from an AST file, print out the filename.

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

11 years agoFix this checkin.
Fariborz Jahanian [Tue, 5 Mar 2013 19:52:24 +0000 (19:52 +0000)]
Fix this checkin.

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

11 years agodoc parsing. Add @method and @callback for
Fariborz Jahanian [Tue, 5 Mar 2013 19:40:47 +0000 (19:40 +0000)]
doc parsing. Add @method and @callback for
checkings and few other refactoring/cleanup.
// rdar://13094352.

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

11 years agoMips specific inline assembler constraint 'R'
Jack Carter [Tue, 5 Mar 2013 19:10:54 +0000 (19:10 +0000)]
Mips specific inline assembler constraint 'R'

'R' An address that can be sued in a non-macro load or store.

Including missing positive test case and fixed typo for r176453.

Thanks to Richard Smith for catching this!

Jack

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

11 years agoMake LibASTMatchersTutorial code match text
Edwin Vane [Tue, 5 Mar 2013 18:04:37 +0000 (18:04 +0000)]
Make LibASTMatchersTutorial code match text

Fixed code to match text. Slight adjustment for readability.

Author: Béatrice Creusillet

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

11 years agoDocumentation: use code highlighting
Dmitri Gribenko [Tue, 5 Mar 2013 13:05:56 +0000 (13:05 +0000)]
Documentation: use code highlighting

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

11 years agoAdd a test that we are passing the -fobjc-default-synthesize flag for Apple and
David Chisnall [Tue, 5 Mar 2013 11:20:04 +0000 (11:20 +0000)]
Add a test that we are passing the -fobjc-default-synthesize flag for Apple and
non-Apple platforms.

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

11 years agoDon't emit calls to virtual [[noreturn]] functions as noreturn; overrides of a
Richard Smith [Tue, 5 Mar 2013 08:30:04 +0000 (08:30 +0000)]
Don't emit calls to virtual [[noreturn]] functions as noreturn; overrides of a
[[noreturn]] function are not required to also be [[noreturn]]. We still emit
calls to virtual __attribute__((noreturn)) functions as noreturn; unlike GCC,
we do require overriders to also be noreturn for that attribute.

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

11 years agoAdd quotation marks to template names in diagnostics.
David Blaikie [Tue, 5 Mar 2013 06:21:38 +0000 (06:21 +0000)]
Add quotation marks to template names in diagnostics.

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

11 years agoscan-build: explicitly say "No bugs found" if there are no reports.
Jordan Rose [Tue, 5 Mar 2013 02:33:08 +0000 (02:33 +0000)]
scan-build: explicitly say "No bugs found" if there are no reports.

Patch by Martin Storsjo!

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

11 years agoSilence a number of static analyzer warnings with assertions and such.
Jordan Rose [Tue, 5 Mar 2013 01:27:54 +0000 (01:27 +0000)]
Silence a number of static analyzer warnings with assertions and such.

No functionality change.

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

11 years agodoc parsing. We want to issue a strong warning when
Fariborz Jahanian [Tue, 5 Mar 2013 01:05:07 +0000 (01:05 +0000)]
doc parsing. We want to issue a strong warning when
an @function comment is not followed by a function decl.
// rdar://13094352

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

11 years ago[analyzer] Don't let cf_audited_transfer override CFRetain semantics.
Jordan Rose [Mon, 4 Mar 2013 23:21:32 +0000 (23:21 +0000)]
[analyzer] Don't let cf_audited_transfer override CFRetain semantics.

We weren't treating a cf_audited_transfer CFRetain as returning +1 because
its name doesn't contain "Create" or "Copy". Oops! Fortunately, the
standard definitions of these functions are not marked audited.

<rdar://problem/13339601>

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

11 years agoComment parsing: refactor handling of command markers in AST
Dmitri Gribenko [Mon, 4 Mar 2013 23:06:15 +0000 (23:06 +0000)]
Comment parsing: refactor handling of command markers in AST

* Use the term 'command marker', because the semantics of 'backslash' and 'at'
  commands are the same.  (Talking about 'at commands' makes them look like a
  special entity.)

* Sink the flag down into bitfields, reducing the size of AST nodes.

* Change the flag into an enum for clarity.  Boolean function parameters are
  not very clear.

* Add unittests for new tok::at_command tokens.

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

11 years agoAdd ARM v6m, v7m, and v7em architectures for Cortex-M series processors.
Bob Wilson [Mon, 4 Mar 2013 22:37:49 +0000 (22:37 +0000)]
Add ARM v6m, v7m, and v7em architectures for Cortex-M series processors.

<rdar://problem/11314476>

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

11 years agoTidy up lists of Cortex-A series processors, adding entries for A7.
Bob Wilson [Mon, 4 Mar 2013 22:37:46 +0000 (22:37 +0000)]
Tidy up lists of Cortex-A series processors, adding entries for A7.

Also fix a missing entry for cortex-r5 in one copy of getLLVMArchSuffixForARM.

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

11 years agoFix confused use of llvm::StringSwitch for armv7r architecture.
Bob Wilson [Mon, 4 Mar 2013 22:37:43 +0000 (22:37 +0000)]
Fix confused use of llvm::StringSwitch for armv7r architecture.

svn 170909 added support for cortex-r5 but in this case it was done
incorrectly. The last argument to StringSwitch.Cases() is the replacement
value, so by adding "cortex-r5" it changed the default cpu for armv7r to
cortex-r5 instead of cortex-r4.

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

11 years agoMips specific inline assembler constraint 'R'
Jack Carter [Mon, 4 Mar 2013 21:36:11 +0000 (21:36 +0000)]
Mips specific inline assembler constraint 'R'

'R' An address that can be sued in a non-macro load or store.
This patch includes a positive test case.

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

11 years ago[PCH] In HeaderFileInfoTrait::EqualKey(), use FileManager::getFile() to compare two...
Argyrios Kyrtzidis [Mon, 4 Mar 2013 20:33:40 +0000 (20:33 +0000)]
[PCH] In HeaderFileInfoTrait::EqualKey(), use FileManager::getFile() to compare two filenames, instead of llvm::sys::fs::equivalent().

llvm::sys::fs::equivalent() does 2 stat calls every time it's called. Use FileManager::getFile() to take advantage
of the stat caching that FileManager is providing.

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

11 years agoComment parsing tests: move a test into a group of similar tests
Dmitri Gribenko [Mon, 4 Mar 2013 20:23:16 +0000 (20:23 +0000)]
Comment parsing tests: move a test into a group of similar tests

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

11 years ago[comment parsing] source fidelity for tparam command too.
Fariborz Jahanian [Mon, 4 Mar 2013 20:08:47 +0000 (20:08 +0000)]
[comment parsing] source fidelity for tparam command too.
// rdar://13066276

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

11 years agoMake sure to not split string literals at the first character.
Manuel Klimek [Mon, 4 Mar 2013 20:03:38 +0000 (20:03 +0000)]
Make sure to not split string literals at the first character.

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

11 years agowarn-documentation.cpp: reorganize tests
Dmitri Gribenko [Mon, 4 Mar 2013 19:39:33 +0000 (19:39 +0000)]
warn-documentation.cpp: reorganize tests

Tests are ordered by command in this file.  It is nice to keep it that way.

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

11 years agocomment parsing. Missed a case of referring
Fariborz Jahanian [Mon, 4 Mar 2013 18:53:41 +0000 (18:53 +0000)]
comment parsing. Missed a case of referring
to original command in diagnostic. // rdar://13066276

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

11 years agohasQualifer() matcher should return false if there's no qualifier
Edwin Vane [Mon, 4 Mar 2013 17:51:00 +0000 (17:51 +0000)]
hasQualifer() matcher should return false if there's no qualifier

Instead of passing NULL on to sub-matcher, just return false. Updated tests and
regenerated docs.

Author: Tareq A Siraj <tareq.a.siraj@intel.com>

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

11 years agoR600: Use the GPU type to determine the correct DataLayout v2
Tom Stellard [Mon, 4 Mar 2013 17:40:53 +0000 (17:40 +0000)]
R600: Use the GPU type to determine the correct DataLayout v2

v2:
  - Add R600_DOUBLE_OPS for RV670
  - s/CPU/GPU/

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176440 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFormat a line if a range in its leading whitespace was selected.
Daniel Jasper [Mon, 4 Mar 2013 13:43:19 +0000 (13:43 +0000)]
Format a line if a range in its leading whitespace was selected.

With [] marking the selected range, clang-format invoked on

    [  ]   int a;

Would so far not reformat anything. With this patch, it formats a
line if its leading whitespace is touched.

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

11 years agoMake the tutorial easier to compile by adding in some of the details.
Manuel Klimek [Mon, 4 Mar 2013 11:31:46 +0000 (11:31 +0000)]
Make the tutorial easier to compile by adding in some of the details.

Patch by Béatrice Creusillet.

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

11 years agoCorrection to r176432: the bug actually fixed was <rdar://13025708>.
John McCall [Mon, 4 Mar 2013 07:35:41 +0000 (07:35 +0000)]
Correction to r176432: the bug actually fixed was <rdar://13025708>.

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

11 years agoCentralize and refine the __unknown_anytype argument rules
John McCall [Mon, 4 Mar 2013 07:34:02 +0000 (07:34 +0000)]
Centralize and refine the __unknown_anytype argument rules
and be sure to apply them whether or not the debugger gave
us a method declaration.

rdar://12565338

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

11 years agoFix the emission of the copy-initialization of a block capture
John McCall [Mon, 4 Mar 2013 06:32:36 +0000 (06:32 +0000)]
Fix the emission of the copy-initialization of a block capture
from a lambda capture when the capture is not trivially-copyable.

rdar://13295759

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

11 years agoCheck for warnings in a bunch of the linker invocations, and add one
Chandler Carruth [Mon, 4 Mar 2013 02:07:55 +0000 (02:07 +0000)]
Check for warnings in a bunch of the linker invocations, and add one
with both -static-libgcc and -static on the commandline.

Fix a warning in the latter case due to a backwards short circuiting ||
operator in the driver. No real functionality changed here, just allows
the driver to properly consume -static-libgcc when -static is also
specified.

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

11 years agoPerform non-overload placeholder conversions on the operands
John McCall [Mon, 4 Mar 2013 01:30:55 +0000 (01:30 +0000)]
Perform non-overload placeholder conversions on the operands
to a subscript operator.

rdar://13332183

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

11 years agoBeef up the testing of our 'ld' invocation on linux to cover static
Chandler Carruth [Mon, 4 Mar 2013 01:27:49 +0000 (01:27 +0000)]
Beef up the testing of our 'ld' invocation on linux to cover static
linking. About to fix a bug here and there was no good test case.

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

11 years agoAdd an idea for a cpp11-migrate tool: TR1 migration
Dmitri Gribenko [Sun, 3 Mar 2013 17:54:36 +0000 (17:54 +0000)]
Add an idea for a cpp11-migrate tool: TR1 migration

Idea by Marshall Clow.

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

11 years agoRemove unused check from test.
David Chisnall [Sun, 3 Mar 2013 17:50:06 +0000 (17:50 +0000)]
Remove unused check from test.

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

11 years ago[docs] Spelling
Sean Silva [Sun, 3 Mar 2013 17:07:35 +0000 (17:07 +0000)]
[docs] Spelling

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

11 years agoImprove C11 atomics support:
David Chisnall [Sun, 3 Mar 2013 16:02:42 +0000 (16:02 +0000)]
Improve C11 atomics support:

- Generate atomicrmw operations in most of the cases when it's sensible to do
  so.
- Don't crash in several common cases (and hopefully don't crash in more of
  them).
- Add some better tests.

We now generate significantly better code for things like:
_Atomic(int) x;
...
x++;

On MIPS, this now generates a 4-instruction ll/sc loop, where previously it
generated about 30 instructions in two nested loops.  On x86-64, we generate a
single lock incl, instead of a lock cmpxchgl loop (one instruction instead of
ten).

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

11 years agoDefault to enabling default-synthesized ivars on all platforms
David Chisnall [Sun, 3 Mar 2013 15:36:10 +0000 (15:36 +0000)]
Default to enabling default-synthesized ivars on all platforms

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

11 years ago[docs] Use vim code-block instead of console.
Sean Silva [Sun, 3 Mar 2013 15:17:35 +0000 (15:17 +0000)]
[docs] Use vim code-block instead of console.

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

11 years agoProcess #pragma weak only after we know the linkage of the function or variable
Rafael Espindola [Sat, 2 Mar 2013 21:41:48 +0000 (21:41 +0000)]
Process #pragma weak only after we know the linkage of the function or variable
we are looking at.

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

11 years agoCommandLineArgumentParser: handle single quotes.
Peter Collingbourne [Sat, 2 Mar 2013 06:00:16 +0000 (06:00 +0000)]
CommandLineArgumentParser: handle single quotes.

Differential Revision: http://llvm-reviews.chandlerc.com/D482

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

11 years ago[analyzer] Simple inline defensive checks suppression
Anna Zaks [Sat, 2 Mar 2013 03:20:52 +0000 (03:20 +0000)]
[analyzer] Simple inline defensive checks suppression

Inlining brought a few "null pointer use" false positives, which occur because
the callee defensively checks if a pointer is NULL, whereas the caller knows
that the pointer cannot be NULL in the context of the given call.

This is a first attempt to silence these warnings by tracking the symbolic value
along the execution path in the BugReporter. The new visitor finds the node
in which the symbol was first constrained to NULL. If the node belongs to
a function on the active stack, the warning is reported, otherwise, it is
suppressed.

There are several areas for follow up work, for example:
 - How do we differentiate the cases where the first check is followed by
another one, which does happen on the active stack?

Also, this only silences a fraction of null pointer use warnings. For example, it
does not do anything for the cases where NULL was assigned inside a callee.

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

11 years agoSome refactoring in my patch on document
Fariborz Jahanian [Sat, 2 Mar 2013 02:39:57 +0000 (02:39 +0000)]
Some refactoring in my patch on document
command source fidelity. // rdar://13066276

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

11 years agoLLVM API changes.
Peter Collingbourne [Sat, 2 Mar 2013 01:20:22 +0000 (01:20 +0000)]
LLVM API changes.

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

11 years agoCMake: -Wno-nested-anon-types for Clang.
Jordan Rose [Sat, 2 Mar 2013 00:49:47 +0000 (00:49 +0000)]
CMake: -Wno-nested-anon-types for Clang.

In LLVM, -pedantic is not set unless LLVM_ENABLE_PEDANTIC is set.
However, Clang's CMakeLists.txt unilaterally adds -pedantic to the run
line, so we need to disable -Wnested-anon-types explicitly.

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

11 years ago[analyzer] Update open source checker build to checker-272.
Jordan Rose [Fri, 1 Mar 2013 23:26:05 +0000 (23:26 +0000)]
[analyzer] Update open source checker build to checker-272.

See http://clang-analyzer.llvm.org/release_notes.html for what's new
in this build.

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

11 years ago[analyzer] Special-case bitfields when finding sub-region bindings.
Jordan Rose [Fri, 1 Mar 2013 23:03:17 +0000 (23:03 +0000)]
[analyzer] Special-case bitfields when finding sub-region bindings.

Previously we were assuming that we'd never ask for the sub-region bindings
of a bitfield, since a bitfield cannot have subregions. However,
unification of code paths has made that assumption invalid. While we could
take advantage of this by just checking for the single possible binding,
it's probably better to do the right thing, so that if/when we someday
support unions we'll do the right thing there, too.

This fixes a handful of false positives in analyzing LLVM.

<rdar://problem/13325522>

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

11 years agocomment parsing. Keep the original command format
Fariborz Jahanian [Fri, 1 Mar 2013 22:51:30 +0000 (22:51 +0000)]
comment parsing. Keep the original command format
in AST for source fidelity and use it in diagnostics
to refer to the original format. // rdar://13066276

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

11 years agoFix typos: [Dd]iagnosic -> [Dd]iagnostic
Stefanus Du Toit [Fri, 1 Mar 2013 21:41:22 +0000 (21:41 +0000)]
Fix typos: [Dd]iagnosic -> [Dd]iagnostic

These all appear in comments or (ironically) diagnostics output.

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

11 years ago[analyzer] Suppress paths involving a reference whose rvalue is null.
Jordan Rose [Fri, 1 Mar 2013 19:45:10 +0000 (19:45 +0000)]
[analyzer] Suppress paths involving a reference whose rvalue is null.

Most map types have an operator[] that inserts a new element if the key
isn't found, then returns a reference to the value slot so that you can
assign into it. However, if the value type is a pointer, it will be
initialized to null. This is usually no problem.

However, if the user /knows/ the map contains a value for a particular key,
they may just use it immediately:

   // From ClangSACheckersEmitter.cpp
   recordGroupMap[group]->Checkers

In this case the analyzer reports a null dereference on the path where the
key is not in the map, even though the user knows that path is impossible
here. They could silence the warning by adding an assertion, but that means
splitting up the expression and introducing a local variable. (Note that
the analyzer has no way of knowing that recordGroupMap[group] will return
the same reference if called twice in a row!)

We already have logic that says a null dereference has a high chance of
being a false positive if the null came from an inlined function. This
patch simply extends that to references whose rvalues are null as well,
silencing several false positives in LLVM.

<rdar://problem/13239854>

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

11 years agoRemove whitespace at end of file.
Daniel Jasper [Fri, 1 Mar 2013 18:11:39 +0000 (18:11 +0000)]
Remove whitespace at end of file.

This fixes the rest of llvm.org/PR15062.

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

11 years agoCorrectly format arrays of pointers and function types.
Daniel Jasper [Fri, 1 Mar 2013 17:13:29 +0000 (17:13 +0000)]
Correctly format arrays of pointers and function types.

Before:
void f(Type(*parameter)[10]) {}
int(*func)(void *);

After:
void f(Type (*parameter)[10]) {}
int (*func)(void *);

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

11 years ago[PCH] Remove building a SmallPtrSet that is not actually used for anything.
Argyrios Kyrtzidis [Fri, 1 Mar 2013 17:01:31 +0000 (17:01 +0000)]
[PCH] Remove building a SmallPtrSet that is not actually used for anything.

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

11 years agoNormal indent for last element of builder-type call.
Daniel Jasper [Fri, 1 Mar 2013 16:48:32 +0000 (16:48 +0000)]
Normal indent for last element of builder-type call.

In builder type call, we indent to the laster function calls.
However, for the last element of such a call, we don't need to do
so, as that normally just wastes space and does not increase
readability.

Before:
aaaaaa->aaaaaa->aaaaaa( // break
                  aaaaaa);
aaaaaaaaaaaaaaaaaaaaa->aaaaaaaaaaaaaaaaaaaaaa
    ->aaaaaaaaaaaaaaaaaaaaaaaaaa(
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);

After:
aaaaaa->aaaaaa->aaaaaa( // break
    aaaaaa);
aaaaaaaaaaaaaaaaaaaaa->aaaaaaaaaaaaaaaaaaaaaa->aaaaaaaaaaaaaaaaaaaaaaaaaa(
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);

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

11 years agoRemove trailing whitespace of line comments.
Daniel Jasper [Fri, 1 Mar 2013 16:45:59 +0000 (16:45 +0000)]
Remove trailing whitespace of line comments.

This fixed llvm.org/PR15378.

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

11 years agoImplements breaking string literals at slashes.
Manuel Klimek [Fri, 1 Mar 2013 13:29:19 +0000 (13:29 +0000)]
Implements breaking string literals at slashes.

We now break at a slash if we do not find a space to break on.

Also fixes a bug where we would go over the limit when breaking the
second line.

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

11 years agoImplement fallback split point for string literals.
Manuel Klimek [Fri, 1 Mar 2013 13:14:08 +0000 (13:14 +0000)]
Implement fallback split point for string literals.

If we don't find a natural split point (currently space) in a string
literal protruding over the line, we just split at the last possible
point.

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