]> granicus.if.org Git - clang/log
clang
11 years agoThread safety analysis: add two new attributes to the thread safety analysis:
DeLesley Hutchins [Fri, 17 May 2013 23:02:59 +0000 (23:02 +0000)]
Thread safety analysis: add two new attributes to the thread safety analysis:
assert_exclusive_lock and assert_shared_lock.  These attributes are used to
mark functions that dynamically check (i.e. assert) that a lock is held.

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

11 years agoUse the awesome CHECK-DAG!
Rafael Espindola [Fri, 17 May 2013 22:33:49 +0000 (22:33 +0000)]
Use the awesome CHECK-DAG!

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

11 years ago[analyzer] Address Jordan's review comments for r182058
Anna Zaks [Fri, 17 May 2013 20:51:16 +0000 (20:51 +0000)]
[analyzer] Address Jordan's review comments for r182058

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

11 years agolibclang: add a function to check whether a member function is pure virtual
Dmitri Gribenko [Fri, 17 May 2013 18:38:35 +0000 (18:38 +0000)]
libclang: add a function to check whether a member function is pure virtual

Patch by Seth Fowler.

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

11 years agoObjective-C parsing. Error recovery when category implementation
Fariborz Jahanian [Fri, 17 May 2013 17:58:11 +0000 (17:58 +0000)]
Objective-C parsing. Error recovery when category implementation
declaration is illegally protocol qualified. // rdar://13920026

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

11 years agoMove documentation to the constructor. Fixes a -Wdocumentation warning
Dmitri Gribenko [Fri, 17 May 2013 17:50:16 +0000 (17:50 +0000)]
Move documentation to the constructor.  Fixes a -Wdocumentation warning

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

11 years agoObjective-C++ (and c++) Sema: Patch fixes a sema crash when gnu’s ?: extension
Fariborz Jahanian [Fri, 17 May 2013 16:29:36 +0000 (16:29 +0000)]
Objective-C++ (and c++) Sema: Patch fixes a sema crash when gnu’s ?: extension
is used for Objective-C++’s dictionary subscripting. This is done by filtering
out all placeholder types before check on lowering of the
common expression is done. // rdar://1374918.
Reviewed by John McCall.

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

11 years agoRefactor diagnostics for MS attributes without -fms-extensions
Reid Kleckner [Fri, 17 May 2013 14:04:52 +0000 (14:04 +0000)]
Refactor diagnostics for MS attributes without -fms-extensions

This shares the warn_attribute_unused diagnostic and reduces the
indentation level.  No functionality change.

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

11 years ago[analyzer; alternate edges] improve support for edges with PseudoObjectExprs.
Ted Kremenek [Fri, 17 May 2013 09:41:40 +0000 (09:41 +0000)]
[analyzer; alternate edges] improve support for edges with PseudoObjectExprs.

This optimizes some spurious edges resulting from PseudoObjectExprs.
This required far more changes than I anticipated.  The current
ParentMap does not record any hierarchy information between
a PseudoObjectExpr and its *semantic* expressions that may be
wrapped in OpaqueValueExprs, which are the expressions actually
laid out in the CFG.  This means the arrow pruning logic could
not map from an expression to its containing PseudoObjectExprs.

To solve this, this patch adds a variant of ParentMap that
returns the "semantic" parentage of expressions (essentially
as they are viewed by the CFG).  This alternate ParentMap is then
used by the arrow reducing logic to identify edges into pseudo
object expressions, and then eliminate them.

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

11 years agoSlightly modify the formatting rules for braced lists.
Daniel Jasper [Fri, 17 May 2013 09:35:01 +0000 (09:35 +0000)]
Slightly modify the formatting rules for braced lists.

Basically, the new rule is: The opening "{" always has to be on the
same line as the first element if the braced list is nested
(e.g. in another braced list or in a function).

The solution that clang-format produces almost always adheres to this
rule anyway and this makes clang-format significantly faster for larger
lists. Added a test cases for the only exception I could find
(which doesn't seem to be very important at first sight).

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

11 years agoAdd embedded video for the AST tutorial.
Manuel Klimek [Fri, 17 May 2013 08:40:22 +0000 (08:40 +0000)]
Add embedded video for the AST tutorial.

As asked for by Sean, putting the video into the docs.

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

11 years ago[analyzer; alternate edges] treat 'if' statements the same way we do as 'for' or...
Ted Kremenek [Fri, 17 May 2013 06:48:27 +0000 (06:48 +0000)]
[analyzer; alternate edges] treat 'if' statements the same way we do as 'for' or 'while'.

This means adding an extra edge from the 'if' to the condition,
which aesthetically looks more pleasing.

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

11 years ago[analyzer; alternate edges] don't add an edge incoming from the start of a function
Ted Kremenek [Fri, 17 May 2013 06:48:22 +0000 (06:48 +0000)]
[analyzer; alternate edges] don't add an edge incoming from the start of a function
for a nested call.  This matches what we do with the first stack frame.

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

11 years agoUse 'c++' not 'cxx' in these diagnostic group names for consistency.
Richard Smith [Fri, 17 May 2013 03:11:25 +0000 (03:11 +0000)]
Use 'c++' not 'cxx' in these diagnostic group names for consistency.

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

11 years agoA little ArrayRef'ization.
Richard Smith [Fri, 17 May 2013 03:04:50 +0000 (03:04 +0000)]
A little ArrayRef'ization.

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

11 years agoPR15757: When we instantiate an inheriting constructor template, also
Richard Smith [Fri, 17 May 2013 02:19:35 +0000 (02:19 +0000)]
PR15757: When we instantiate an inheriting constructor template, also
instantiate the inherited constructor template and mark that as the constructor
which the instantiated specialization is inheriting. This fixes a
crash-on-valid when trying to compute the exception specification of a
specialization of the inheriting constructor.

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

11 years ago[analyzer] Don't inline ~shared_ptr.
Jordan Rose [Fri, 17 May 2013 02:16:49 +0000 (02:16 +0000)]
[analyzer] Don't inline ~shared_ptr.

The analyzer can't see the reference count for shared_ptr, so it doesn't
know whether a given destruction is going to delete the referenced object.
This leads to spurious leak and use-after-free warnings.

For now, just ban destructors named '~shared_ptr', which catches
std::shared_ptr, std::tr1::shared_ptr, and boost::shared_ptr.

PR15987

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

11 years agoAST dumping: if a declaration has an uncomputed or uninstantiated exception specifica...
Richard Smith [Fri, 17 May 2013 02:09:46 +0000 (02:09 +0000)]
AST dumping: if a declaration has an uncomputed or uninstantiated exception specification, include that in the dump.

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

11 years ago[analyzer] Add an option to use the last location in the main source file as the...
Anna Zaks [Thu, 16 May 2013 22:30:45 +0000 (22:30 +0000)]
[analyzer] Add an option to use the last location in the main source file as the report location.

Previously, we’ve used the last location of the analyzer issue path as the location of the
report. This might not provide the best user experience, when one analyzer a source
file and the issue appears in the header. Introduce an option to use the last location
of the path that is in the main source file as the report location.

New option can be enabled with -analyzer-config report-in-main-source-file=true.

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

11 years agoSince we're counting number of steps, switch to turing machines which maximize
Richard Smith [Thu, 16 May 2013 22:18:32 +0000 (22:18 +0000)]
Since we're counting number of steps, switch to turing machines which maximize
#steps not #1s, and use a more traditional step count where the 'halt' step is
not counted.

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

11 years ago[Lexer] Improve Lexer::getSourceText() when the given range deals with function macro...
Argyrios Kyrtzidis [Thu, 16 May 2013 21:37:39 +0000 (21:37 +0000)]
[Lexer] Improve Lexer::getSourceText() when the given range deals with function macro arguments.

This is a modified version of a patch by Manuel Klimek.

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

11 years agoAdd testcase omitted from r181998.
Richard Smith [Thu, 16 May 2013 19:52:25 +0000 (19:52 +0000)]
Add testcase omitted from r181998.

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

11 years agoObjective-C arc: Diagnose when user attempts to
Fariborz Jahanian [Thu, 16 May 2013 19:08:44 +0000 (19:08 +0000)]
Objective-C arc: Diagnose when user attempts to
synthesize a property getter method that overrides
a method definition named 'retain' and the like.
Fixes // rdar://13885083

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

11 years agofix PR 15726: ptrdiff_t should be int on PowerPC Darwin
David Fang [Thu, 16 May 2013 17:51:48 +0000 (17:51 +0000)]
fix PR 15726: ptrdiff_t should be int on PowerPC Darwin

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

11 years agoAdd additional test-case for one-line-function.
Daniel Jasper [Thu, 16 May 2013 16:54:34 +0000 (16:54 +0000)]
Add additional test-case for one-line-function.

This ensures that we format:
void longFunctionName {
} // long comment here

And not:
void longFunctionName {}
// long comment here

As requested in post-commit-review.

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

11 years agoAdd basic clang-format integration for sublime text.
Daniel Jasper [Thu, 16 May 2013 15:08:25 +0000 (15:08 +0000)]
Add basic clang-format integration for sublime text.

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

11 years agoDon't insert a break into include lines with trailing comments.
Daniel Jasper [Thu, 16 May 2013 12:59:13 +0000 (12:59 +0000)]
Don't insert a break into include lines with trailing comments.

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

11 years agoAdd config parsing test for new parameter.
Daniel Jasper [Thu, 16 May 2013 12:16:23 +0000 (12:16 +0000)]
Add config parsing test for new parameter.

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

11 years agoAdd option to put short loops on a single line.
Daniel Jasper [Thu, 16 May 2013 12:12:21 +0000 (12:12 +0000)]
Add option to put short loops on a single line.

This enables things like:

for (int &v : vec) v *= 2;

Enabled for Google style.

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

11 years agoLet CodeGenFunction::EmitVarDecl query the semantic storage class info.
Enea Zaffanella [Thu, 16 May 2013 11:27:56 +0000 (11:27 +0000)]
Let CodeGenFunction::EmitVarDecl query the semantic storage class info.
Added testcase corresponding to PR15991.

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

11 years agoAdd a more convenient interface to use clang-format.
Daniel Jasper [Thu, 16 May 2013 10:40:07 +0000 (10:40 +0000)]
Add a more convenient interface to use clang-format.

It turns out that several implementations go through the trouble of
setting up a SourceManager and Lexer and abstracting this into a
function makes usage easier.

Also abstracts SourceManager-independent ranges out of
tooling::Refactoring and provides a convenience function to create them
from line ranges.

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

11 years agoComments should not prevent single-line functions.
Daniel Jasper [Thu, 16 May 2013 10:17:39 +0000 (10:17 +0000)]
Comments should not prevent single-line functions.

Before:
void f() {}
void g() {
} // comment

After:
void f() {}
void g() {} // comment

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

11 years agoSemaInit.cpp: give both IsStringInit() functions the same return type.
Hans Wennborg [Thu, 16 May 2013 09:22:40 +0000 (09:22 +0000)]
SemaInit.cpp: give both IsStringInit() functions the same return type.

This addresses Richard's comment on r181880.

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

11 years agoclang/test/Modules/self-import-header/test.m: Add explicit -target.
NAKAMURA Takumi [Thu, 16 May 2013 06:59:30 +0000 (06:59 +0000)]
clang/test/Modules/self-import-header/test.m: Add explicit -target.

Clang has an issue between mingw/include/float.h and clang/Headers/float.h with cyclic include_next.
For now, it should work to suppress #include_next in clang/float.h with an explicit target.
(It may work with -U__MINGW32__, though.)

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

11 years agoFirst pass of semantic analysis for init-captures: check the initializer, build
Richard Smith [Thu, 16 May 2013 06:20:58 +0000 (06:20 +0000)]
First pass of semantic analysis for init-captures: check the initializer, build
a FieldDecl from it, and propagate both into the closure type and the
LambdaExpr.

You can't do much useful with them yet -- you can't use them within the body
of the lambda, because we don't have a representation for "the this of the
lambda, not the this of the enclosing context". We also don't have support or a
representation for a nested capture of an init-capture yet, which was intended
to work despite not being allowed by the current standard wording.

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

11 years agoTidy up now that PointerUnion has an operator== that works.
Richard Smith [Thu, 16 May 2013 05:04:51 +0000 (05:04 +0000)]
Tidy up now that PointerUnion has an operator== that works.

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

11 years agoFix pr15930.
Rafael Espindola [Thu, 16 May 2013 04:30:21 +0000 (04:30 +0000)]
Fix pr15930.

In the case of inline functions, we have to special case local types
when they are used as template arguments to make sure the template
instantiations are still uniqued in case the function itself is inlined.

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

11 years agoAdd back accidentally deleted line and add test for it.
Daniel Jasper [Thu, 16 May 2013 04:26:02 +0000 (04:26 +0000)]
Add back accidentally deleted line and add test for it.

Before:
f("a", "b"
  "c");
After:
f("a", "b"
       "c");

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

11 years agoCheck a pointer is not null before attempting to use it. This prevents a
Richard Trieu [Thu, 16 May 2013 02:14:08 +0000 (02:14 +0000)]
Check a pointer is not null before attempting to use it.  This prevents a
crash on an explicit specialization of a member function in a class scope.

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

11 years agoReturn QualType() when a too large array is attempting to be created. This
Richard Trieu [Thu, 16 May 2013 01:46:09 +0000 (01:46 +0000)]
Return QualType() when a too large array is attempting to be created.  This
prevents further errors and some overflows in size calculations.
One overflow was previously triggering an assert.

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

11 years agoEnable $Date$ substitution for this file.
Richard Smith [Thu, 16 May 2013 01:25:47 +0000 (01:25 +0000)]
Enable $Date$ substitution for this file.

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

11 years agoStart a page tracking which C++ defect reports have been implemented in Clang.
Richard Smith [Thu, 16 May 2013 01:23:30 +0000 (01:23 +0000)]
Start a page tracking which C++ defect reports have been implemented in Clang.
The page is generated from a text file listing DR numbers and implementation
status, plus a copy of the cwg_index.html from the WG21 website. Recipe:

  $ wget http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_index.html
  $ ./make_cxx_dr_status >! cxx_dr_status.html

The intent here is to go through all the DRs, add tests for each one, then mark
them as done once such tests are committed and passing. I've not linked to this
page from anywhere, since it doesn't contain any useful information yet.

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

11 years agoWhitespace.
Eric Christopher [Thu, 16 May 2013 00:52:23 +0000 (00:52 +0000)]
Whitespace.

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

11 years ago80-columns.
Eric Christopher [Thu, 16 May 2013 00:52:20 +0000 (00:52 +0000)]
80-columns.

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

11 years agoReplace a pile of calls with an instance variable that's set
Eric Christopher [Thu, 16 May 2013 00:45:23 +0000 (00:45 +0000)]
Replace a pile of calls with an instance variable that's set
once. Should be no functional change.

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

11 years agoAdd a test to verify that -flimit-debug-info is working in some way.
Eric Christopher [Thu, 16 May 2013 00:45:20 +0000 (00:45 +0000)]
Add a test to verify that -flimit-debug-info is working in some way.

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

11 years agoFix comment.
Eric Christopher [Thu, 16 May 2013 00:45:18 +0000 (00:45 +0000)]
Fix comment.

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

11 years agoRemove xfail'd test. This method of limiting debug info isn't
Eric Christopher [Thu, 16 May 2013 00:45:15 +0000 (00:45 +0000)]
Remove xfail'd test. This method of limiting debug info isn't
going to go anywhere.

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

11 years agoWhitespace.
Eric Christopher [Thu, 16 May 2013 00:45:12 +0000 (00:45 +0000)]
Whitespace.

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

11 years agoClarify comment.
Adrian Prantl [Thu, 16 May 2013 00:41:31 +0000 (00:41 +0000)]
Clarify comment.

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

11 years agoSet the debug location for landing pad code to the canonical EH location.
Adrian Prantl [Thu, 16 May 2013 00:41:29 +0000 (00:41 +0000)]
Set the debug location for landing pad code to the canonical EH location.
It used to point to the first call that caused the landing pad to
be generated.

rdar://problem/13888152

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

11 years agoCleanup: Use a member variable to store the SourceLocation for EH code.
Adrian Prantl [Thu, 16 May 2013 00:41:26 +0000 (00:41 +0000)]
Cleanup: Use a member variable to store the SourceLocation for EH code.
rdar://problem/13888152

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

11 years agoRevert "Debug Info: Using declarations/DW_TAG_imported_declaration of variables,...
David Blaikie [Wed, 15 May 2013 23:46:19 +0000 (23:46 +0000)]
Revert "Debug Info: Using declarations/DW_TAG_imported_declaration of variables, types, and functions."

This reverts commit r181393 (git 3923d6a87fe7b2c91cc4a7dbd90c4ec7e2316bcd).

This seems to be emitting too much extra debug info for two (known)
reasons:
* full class definitions are emitted when only declarations are expected
* unused using declarations still produce DW_TAG_imported_declarations

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

11 years agoRemove unused, awkward CFGStmtVisitor and subclasses.
Jordan Rose [Wed, 15 May 2013 23:22:55 +0000 (23:22 +0000)]
Remove unused, awkward CFGStmtVisitor and subclasses.

This class is a StmtVisitor that distinguishes between block-level and
non-block-level statements in a CFG. However, it does so using a hard-coded
idea of which statements might be block-level, which probably isn't accurate
anymore. The only implementer of the CFGStmtVisitor hierarchy was the
analyzer's DeadStoresChecker, and the analyzer creates a linearized CFG
anyway (every non-trivial statement is a block-level statement).

This also allows us to remove the block-expr map ("BlkExprMap"), which
mapped statements to positions in the CFG. Apart from having a helper type
that really should have just been Optional<unsigned>, it was only being
used to ask /if/ a particular expression was block-level, for traversal
purposes in CFGStmtVisitor.

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

11 years agoObjective-C: More cases of -Wsign-conversion not
Fariborz Jahanian [Wed, 15 May 2013 22:25:03 +0000 (22:25 +0000)]
Objective-C: More cases of -Wsign-conversion not
working on new Objective-C array subscripting
syntax. // rdar://13855682

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

11 years agoTest commit
Samuel Benzaquen [Wed, 15 May 2013 19:49:05 +0000 (19:49 +0000)]
Test commit

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

11 years agoObjective-C: patch to issue the conversion
Fariborz Jahanian [Wed, 15 May 2013 19:03:04 +0000 (19:03 +0000)]
Objective-C: patch to issue the conversion
warning when property-dot syntax is used
with -Wsign-conversion. // rdar://13855394

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

11 years ago[analyzer] Put back DefaultBool's implicit conversion to bool.
Jordan Rose [Wed, 15 May 2013 18:08:15 +0000 (18:08 +0000)]
[analyzer] Put back DefaultBool's implicit conversion to bool.

DefaultBool is basically just "bool with a default constructor", so it
really should implicitly convert to bool. In fact, it should convert to
bool&, so that it could be passed to functions that take bools by reference.

This time, mark the operator bool& as implicit to promise that it's
deliberate.

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

11 years agoimprove of note message and minor refactoring of my last
Fariborz Jahanian [Wed, 15 May 2013 15:27:35 +0000 (15:27 +0000)]
improve of note message and minor refactoring of my last
patch (r181847).

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

11 years agoFix test breakage caused by change in clang-format.
Daniel Jasper [Wed, 15 May 2013 14:27:33 +0000 (14:27 +0000)]
Fix test breakage caused by change in clang-format.

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

11 years agoDon't put short namespace on a single line.
Daniel Jasper [Wed, 15 May 2013 14:09:55 +0000 (14:09 +0000)]
Don't put short namespace on a single line.

Before:
namespace abc { class SomeClass; }
namespace def { void someFunction() {} }

After:
namespace abc {
class Def;
}
namespace def {
void someFunction() {}
}

Rationale:
a) Having anything other than forward declaration on the same line
   as a namespace looks confusing.
b) Formatting namespace-forward-declaration-combinations different
   from other stuff is inconsistent.
c) Wasting vertical space close to such forward declarations really
   does not affect readability.

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

11 years agoImprove recognition of template definitions.
Daniel Jasper [Wed, 15 May 2013 13:46:48 +0000 (13:46 +0000)]
Improve recognition of template definitions.

In the long run, this will probably be better fixed by a proper
expression parser..

Before:
  template <typename F>
  Matcher(const Matcher<F> & Other,
          typename enable_if_c < is_base_of<F, T>::value &&
              !is_same<F, T>::value > ::type * = 0)
      : Implementation(new ImplicitCastMatcher<F>(Other)) {}

After:
  template <typename F>
  Matcher(const Matcher<F> & Other,
          typename enable_if_c<is_base_of<F, T>::value &&
                               !is_same<F, T>::value>::type * = 0)
      : Implementation(new ImplicitCastMatcher<F>(Other)) {}

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

11 years agoBetter diagnostics for string initialization.
Hans Wennborg [Wed, 15 May 2013 11:03:04 +0000 (11:03 +0000)]
Better diagnostics for string initialization.

This commit improves Clang's diagnostics for string initialization.
Where it would previously say:

  /tmp/a.c:3:9: error: array initializer must be an initializer list
  wchar_t s[] = "Hi";
          ^
  /tmp/a.c:4:6: error: array initializer must be an initializer list or string literal
  char t[] = L"Hi";
       ^

It will now say

  /tmp/a.c:3:9: error: initializing wide char array with non-wide string literal
  wchar_t s[] = "Hi";
          ^
  /tmp/a.c:4:6: error: initializing char array with wide string literal
  char t[] = L"Hi";
       ^

As a bonus, it also fixes the fact that Clang would previously reject
this valid C11 code:

  char16_t s[] = u"hi";
  char32_t t[] = U"hi";

because it would only recognize the built-in types for char16_t and
char32_t, which do not exist in C.

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

11 years agoBreak function declarations after multi-line return types.
Daniel Jasper [Wed, 15 May 2013 09:35:08 +0000 (09:35 +0000)]
Break function declarations after multi-line return types.

Before:
template <typename A>
SomeLoooooooooooooooooooooongType<
    typename some_namespace::SomeOtherType<A>::Type> Function() {}

After:
template <typename A>
SomeLoooooooooooooooooooooongType<
    typename some_namespace::SomeOtherType<A>::Type>
Function() {}

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

11 years agoDon't merge one-line functions in weird brace styles.
Daniel Jasper [Wed, 15 May 2013 08:30:06 +0000 (08:30 +0000)]
Don't merge one-line functions in weird brace styles.

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

11 years agoRemove diagnostics from clang-format.
Daniel Jasper [Wed, 15 May 2013 08:14:19 +0000 (08:14 +0000)]
Remove diagnostics from clang-format.

We only ever implemented one and that one is not actually all that
helpful (e.g. gets incorrectly triggered by macros).

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

11 years agoImprove formatting of function types.
Daniel Jasper [Wed, 15 May 2013 07:51:51 +0000 (07:51 +0000)]
Improve formatting of function types.

The function type detection in r181438 and r181764 detected function
types too eagerly. This led to inconsistent formatting of inline
assembly and (together with r181687) to an incorrect formatting of calls
in macros.

Before: #define DEREF_AND_CALL_F(parameter) f (*parameter)
After:  #define DEREF_AND_CALL_F(parameter) f(*parameter)

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

11 years agoUse only explicit bool conversion operator
David Blaikie [Wed, 15 May 2013 07:37:26 +0000 (07:37 +0000)]
Use only explicit bool conversion operator

The most common (non-buggy) case are where such objects are used as
return expressions in bool-returning functions or as boolean function
arguments. In those cases I've used (& added if necessary) a named
function to provide the equivalent (or sometimes negative, depending on
convenient wording) test.

DiagnosticBuilder kept its implicit conversion operator owing to the
prevalent use of it in return statements.

One bug was found in ExprConstant.cpp involving a comparison of two
PointerUnions (PointerUnion did not previously have an operator==, so
instead both operands were converted to bool & then compared). A test
is included in test/SemaCXX/constant-expression-cxx1y.cpp for the fix
(adding operator== to PointerUnion in LLVM).

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

11 years agoUse correct types for SPARC v9.
Jakob Stoklund Olesen [Wed, 15 May 2013 03:22:33 +0000 (03:22 +0000)]
Use correct types for SPARC v9.

It's an LP64 platform.

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

11 years agoARM: Improve codegen for vget_low_* and vget_high_ intrinsics.
Jim Grosbach [Wed, 15 May 2013 02:40:04 +0000 (02:40 +0000)]
ARM: Improve codegen for vget_low_* and vget_high_ intrinsics.

These intrinsics use the __builtin_shuffle() function to extract the
low and high half, respectively, of a 128-bit NEON vector. Currently,
they're defined to use bitcasts to simplify the emitter, so we get code
like:
uint16x4_t vget_low_u32(uint16x8_t __a) {
  return (uint32x2_t) __builtin_shufflevector((int64x2_t) __a,
                                              (int64x2_t) __a,
                                              0);
}

While this works, it results in those bitcasts going all the way through
to the IR, resulting in code like:
  %1 = bitcast <8 x i16> %in to <2 x i64>
  %2 = shufflevector <2 x i64> %1, <2 x i64> undef, <1 x i32>
  %zeroinitializer
  %3 = bitcast <1 x i64> %2 to <4 x i16>

We can instead easily perform the operation directly on the input vector
like:

uint16x4_t vget_low_u16(uint16x8_t __a) {
  return __builtin_shufflevector(__a, __a, 0, 1, 2, 3);
}

Not only is that much easier to read on its own, it also results in
cleaner IR like:

  %1 = shufflevector <8 x i16> %in, <8 x i16> undef,
                     <4 x i32> <i32 0, i32 1, i32 2, i32 3>

This is both easier to read and easier for the back end to reason
about effectively since the operation is obfuscating the source with
bitcasts.

rdar://13894163

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

11 years agoUse 'env' in tests that set environment variables.
Jordan Rose [Wed, 15 May 2013 01:45:37 +0000 (01:45 +0000)]
Use 'env' in tests that set environment variables.

Patch by David Fang!

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

11 years agoMove a test that requires 64-bit mode to a separate test with a triple in
Richard Trieu [Wed, 15 May 2013 00:44:06 +0000 (00:44 +0000)]
Move a test that requires 64-bit mode to a separate test with a triple in
the run line.

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

11 years agoUnbreaking the MSVC build by adding an include. It broke with r181832.
Aaron Ballman [Tue, 14 May 2013 23:52:21 +0000 (23:52 +0000)]
Unbreaking the MSVC build by adding an include.  It broke with r181832.

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

11 years agoAdd static_cast to assertion to silence sign/unsigned comparison warning.
Richard Trieu [Tue, 14 May 2013 23:41:50 +0000 (23:41 +0000)]
Add static_cast to assertion to silence sign/unsigned comparison warning.

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

11 years agoObjective-C [diagnostics] [QOI], when method is not
Fariborz Jahanian [Tue, 14 May 2013 23:24:17 +0000 (23:24 +0000)]
Objective-C [diagnostics] [QOI], when method is not
found for a receiver, note where receiver class
is declaraed (this is most common when receiver is a forward
class). // rdar://3258331

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

11 years agoDon't mark a type specifier as "owned" if there is no declaration to own.
Douglas Gregor [Tue, 14 May 2013 23:22:32 +0000 (23:22 +0000)]
Don't mark a type specifier as "owned" if there is no declaration to own.

This simplifies error recovery elsewhere, eliminating the crash in
<rdar://problem/13853540>.

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

11 years agoWhen computing the size of large arrays, use char units instead of bits.
Richard Trieu [Tue, 14 May 2013 21:59:17 +0000 (21:59 +0000)]
When computing the size of large arrays, use char units instead of bits.
This prevents an overflow and assertion when the number of bits cannot be
stored in 64-bits.

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

11 years agoFix clang -Werror build due to -Wreorder violation introduced in r181825
David Blaikie [Tue, 14 May 2013 21:31:46 +0000 (21:31 +0000)]
Fix clang -Werror build due to -Wreorder violation introduced in r181825

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

11 years agoProvide operator<< for stream output of DeclarationNames
David Blaikie [Tue, 14 May 2013 21:04:00 +0000 (21:04 +0000)]
Provide operator<< for stream output of DeclarationNames

ASTDumper was already trying to do this & instead got an implicit bool
conversion by surprise (thus printing out 0 or 1 instead of the name of
the declaration). To avoid that issue & simplify call sites, simply make
it the normal/expected operator<<(raw_ostream&, ...) overload & simplify
all the existing call sites. (bonus: this function doesn't need to be a
member or friend, it's just using public API in DeclarationName)

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

11 years agoFix copy-pasto in naming of LAST_MS_INHERITANCE[_ATTR]
Reid Kleckner [Tue, 14 May 2013 20:55:49 +0000 (20:55 +0000)]
Fix copy-pasto in naming of LAST_MS_INHERITANCE[_ATTR]

Richard Smith pointed this out over a month ago.

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

11 years agoFix expression breaking for one-parameter-per-line styles.
Daniel Jasper [Tue, 14 May 2013 20:39:56 +0000 (20:39 +0000)]
Fix expression breaking for one-parameter-per-line styles.

Before:
  if (aaaaaaaaaaaaaaaaaaaaaaaaaaaa || aaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
      aaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
      aaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
      aaaaaaaaaaaaaaaaaaaaaaaaaaaa) {}
After:
  if (aaaaaaaaaaaaaaaaaaaaaaaaaaaa || aaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
      aaaaaaaaaaaaaaaaaaaaaaaaaaaa || aaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
      aaaaaaaaaaaaaaaaaaaaaaaaaaaa) {}

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

11 years agoFix the MSVC build broken by r181768
Reid Kleckner [Tue, 14 May 2013 20:30:49 +0000 (20:30 +0000)]
Fix the MSVC build broken by r181768

MSVC accepts the using decl but not the typedef.  It complains that the
typedef is ambiguous.

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

11 years ago[ms-cxxabi] Mangle in an implicit 'E' for certain types on win64
Reid Kleckner [Tue, 14 May 2013 20:30:42 +0000 (20:30 +0000)]
[ms-cxxabi] Mangle in an implicit 'E' for certain types on win64

Most of the complexity of this patch is figuring out which types get the
qualifier and which don't.  If we implement __ptr32/64, then we should
check the qualifier instead of assuming all pointers are 64-bit.

This fixes PR13792.

Patch by Warren Hunt!

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

11 years agoReally fix the declaration of __clear_cache.
Rafael Espindola [Tue, 14 May 2013 18:06:10 +0000 (18:06 +0000)]
Really fix the declaration of __clear_cache.

When I tested gcc's behaviour before, I forgot the extern "C", so it
would warn when the types *did* match.

So in the end
* __clear_cache takes two void pointers.
* aarch64 was correct before.
* libgcc's manual is wrong.
* this patch fixes arm.

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

11 years agoAdd LeakSanitizer.rst to docs.
Sergey Matveev [Tue, 14 May 2013 15:48:54 +0000 (15:48 +0000)]
Add LeakSanitizer.rst to docs.

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

11 years agoFix __clear_cache on ARM.
Rafael Espindola [Tue, 14 May 2013 12:45:47 +0000 (12:45 +0000)]
Fix __clear_cache on ARM.

Current gcc's produce an error if __clear_cache is anything but

__clear_cache(char *a, char *b);

It looks like we had just implemented a gcc bug that is now fixed.

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

11 years agoLink dynamic ast matchers with the ast matchers library. Unbreaks shared cmake build.
Benjamin Kramer [Tue, 14 May 2013 12:41:50 +0000 (12:41 +0000)]
Link dynamic ast matchers with the ast matchers library. Unbreaks shared cmake build.

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

11 years agoRevert accidental commit.
Benjamin Kramer [Tue, 14 May 2013 12:23:08 +0000 (12:23 +0000)]
Revert accidental commit.

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

11 years agoTake a stab at trying to unbreak the makefile build.
Benjamin Kramer [Tue, 14 May 2013 12:21:21 +0000 (12:21 +0000)]
Take a stab at trying to unbreak the makefile build.

There is no clangRewrite.a.

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

11 years agoHopefully fix configure build.
Manuel Klimek [Tue, 14 May 2013 11:59:20 +0000 (11:59 +0000)]
Hopefully fix configure build.

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

11 years agoFix uninitialized value bug found by valgrind.
Daniel Jasper [Tue, 14 May 2013 10:44:17 +0000 (10:44 +0000)]
Fix uninitialized value bug found by valgrind.

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

11 years agoCorrectly determine ranges for clang-format.
Daniel Jasper [Tue, 14 May 2013 10:31:09 +0000 (10:31 +0000)]
Correctly determine ranges for clang-format.

We have been assuming that CharSourceRange::getTokenRange() by itself
expands a range until the end of a token, but in fact it only sets
IsTokenRange to true. Thus, we have so far only considered the first
character of the last token to belong to an unwrapped line. This
did not really manifest in symptoms as all edit integrations
expand ranges to fully lines.

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

11 years agoFix clang-format bug in unwrapped-line merging.
Daniel Jasper [Tue, 14 May 2013 09:30:02 +0000 (09:30 +0000)]
Fix clang-format bug in unwrapped-line merging.

Before (in styles that allow it), clang-format would not merge an
if statement onto a single line, if only the second line was format
(e.g. in an editor integration):

if (a)
  return; // clang-format invoked on this line.

With this patch, this gets properly merged to:

if (a) return; // ...

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

11 years agoFirst revision of the dynamic ASTMatcher library.
Manuel Klimek [Tue, 14 May 2013 09:13:00 +0000 (09:13 +0000)]
First revision of the dynamic ASTMatcher library.

This library supports all the features of the compile-time based ASTMatcher
library, but allows the user to specify and construct the matchers at runtime.
It contains the following modules:
 - A variant type, to be used by the matcher factory.
 - A registry, where the matchers are indexed by name and have a factory method
   with a generic signature.
 - A simple matcher expression parser, that can be used to convert a matcher
   expression string into actual matchers that can be used with the AST at
   runtime.

Many features where omitted from this first revision to simplify this code
review. The main ideas are still represented in this change and it already has
support working use cases.
Things that are missing:
 - Support for polymorphic matchers. These requires supporting code in the
   registry, the marshallers and the variant type.
 - Support for numbers, char and bool arguments to the matchers. This requires
   supporting code in the parser and the variant type.
 - A command line program putting everything together and providing an already
   functional tool.

Patch by Samuel Benzaquen.

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

11 years agoImplement string literal breaking on unbreakable token sequences.
Manuel Klimek [Tue, 14 May 2013 09:04:24 +0000 (09:04 +0000)]
Implement string literal breaking on unbreakable token sequences.

This fixes indentation where there are for example multiple closing
parentheses after a string literal, and where those parentheses
run over the end of the line.

During testing this revealed a bug in the implementation of
breakProtrudingToken: we don't want to change the state if we didn't
actually do anything.

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

11 years agoUpdate clang-format emacs integration.
Daniel Jasper [Tue, 14 May 2013 08:48:24 +0000 (08:48 +0000)]
Update clang-format emacs integration.

- Remove free variables
- Add function clang-format-buffer, e.g. for before-save-hooks
- Wrap restoring windows in an unwind-protect

Patch by Stephen Gildea!

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

11 years agoAArch64: add test for updated __clear_cache definition
Tim Northover [Tue, 14 May 2013 08:37:13 +0000 (08:37 +0000)]
AArch64: add test for updated __clear_cache definition

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

11 years agoDon't format sizeof/alignof as function types.
Daniel Jasper [Tue, 14 May 2013 08:34:47 +0000 (08:34 +0000)]
Don't format sizeof/alignof as function types.

Before: A<sizeof (*x)> a;
After:  A<sizeof(*x)> a;

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

11 years agoAArch64: correct definition of __clear_cache
Tim Northover [Tue, 14 May 2013 08:26:14 +0000 (08:26 +0000)]
AArch64: correct definition of __clear_cache

According to libgcc document __clear_cache takes two char*
pointers. I suspect GCC's actual behaviour is more subtle than that,
but char* should clearly be preferred to void*.

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

11 years agoReplace EXPECT_EQ with EXPECT_FALSE to avoid gcc warning
Patrik Hagglund [Tue, 14 May 2013 07:53:53 +0000 (07:53 +0000)]
Replace EXPECT_EQ with EXPECT_FALSE to avoid gcc warning
[-Wconversion-null], introduced in r181326.

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