- May 19, 2013
-
-
Alexander Kornienko authored
Summary: + improved handling of default style and predefined styles. Reviewers: djasper, klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D813 llvm-svn: 182205
-
Anna Zaks authored
llvm-svn: 182204
-
- May 18, 2013
-
-
Chandler Carruth authored
imply -fno-math-errno if the user passed -fno-fast-math OR -ffast-math, regardless of in which order and regardless of the tool chain default. I've fixed this to follow the logic: 1) If the last dominating flag is -fno-math-errno, -ffast-math, or -Ofast, then do not use math-errno. 2) If the last dominating flag is an explicit -fmath-errno, do use math-errno. 3) Otherwise, use the toolchain default. This, for example, allows the flag sequence '-ffast-math ... -fno-fast-math' with no mention of '-fmath-errno' or '-fno-math-errno' to preserve the toolchain default. Most notably, this should prevent users trying to disable fast-math optimizations on Darwin and BSD platforms from simultaneously enabling (pointless) -fmath-errno. I've enhanced the tests (after more reorganization) to cover this and other weird permutations of flags and targets. llvm-svn: 182203
-
Chandler Carruth authored
setting. Consolidate the collection of tests that enable -fmath-errno and share a single CHECK line for simplicity. llvm-svn: 182202
-
Serge Pavlov authored
llvm-svn: 182189
-
Jordan Rose authored
llvm-svn: 182188
-
Jordan Rose authored
Constructs like PseudoObjectExpr, where an expression can appear more than once in the AST, use OpaqueValueExprs to guard against inadvertent re-processing of the shared expression during AST traversal. The most common form of this is to share expressions between the syntactic "as-written" form of, say, an Objective-C property access 'obj.prop', and the underlying "semantic" form '[obj prop]'. However, some constructs can produce OpaqueValueExprs that don't appear in the syntactic form at all; in these cases the ParentMap wasn't ever traversing the children of these expressions. This patch fixes that by checking to see if an OpaqueValueExpr's child has ever been traversed before. There's also a bit of reset logic when visiting a PseudoObjectExpr to handle the case of updating the ParentMap, which some external clients depend on. This still isn't exactly the right fix because we probably want the parent of the OpaqueValueExpr itself to be its location in the syntactic form if it's syntactic and the PseudoObjectExpr or BinaryConditionalOperator itself if it's semantic. Whe I originally wrote the code to do this, I didn't realize that OpaqueValueExprs themselves are shared in the AST, not just their source expressions. This patch doesn't change the existing behavior so as not to break anything inadvertently relying on it; we'll come back to this later. llvm-svn: 182187
-
Jordan Rose authored
Originally implemented by Ted, extended by me. llvm-svn: 182186
-
Jordan Rose authored
Ted and I spent a long time discussing this today and found out that neither the existing code nor the new code was doing what either of us thought it was, which is never good. The good news is we found a much simpler way to fix the motivating test case (an ObjCSubscriptExpr). This reverts r182083, but pieces of it will come back in subsequent commits. llvm-svn: 182185
-
Rafael Espindola authored
Thanks to John McCall for pointing this out. llvm-svn: 182182
-
Adrian Prantl authored
llvm-svn: 182178
-
Adrian Prantl authored
properties declared in a protocol. rdar://problem/13798000 llvm-svn: 182176
-
DeLesley Hutchins authored
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. llvm-svn: 182170
-
Rafael Espindola authored
llvm-svn: 182167
-
- May 17, 2013
-
-
Anna Zaks authored
llvm-svn: 182156
-
Dmitri Gribenko authored
Patch by Seth Fowler. llvm-svn: 182139
-
Fariborz Jahanian authored
declaration is illegally protocol qualified. // rdar://13920026 llvm-svn: 182136
-
Dmitri Gribenko authored
llvm-svn: 182134
-
Fariborz Jahanian authored
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. llvm-svn: 182120
-
Reid Kleckner authored
This shares the warn_attribute_unused diagnostic and reduces the indentation level. No functionality change. llvm-svn: 182096
-
Ted Kremenek authored
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. llvm-svn: 182083
-
Daniel Jasper authored
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). llvm-svn: 182082
-
Manuel Klimek authored
As asked for by Sean, putting the video into the docs. llvm-svn: 182081
-
Ted Kremenek authored
This means adding an extra edge from the 'if' to the condition, which aesthetically looks more pleasing. llvm-svn: 182079
-
Ted Kremenek authored
for a nested call. This matches what we do with the first stack frame. llvm-svn: 182078
-
Richard Smith authored
llvm-svn: 182075
-
Richard Smith authored
llvm-svn: 182074
-
Richard Smith authored
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. llvm-svn: 182072
-
Jordan Rose authored
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 llvm-svn: 182071
-
Richard Smith authored
AST dumping: if a declaration has an uncomputed or uninstantiated exception specification, include that in the dump. llvm-svn: 182070
-
Anna Zaks authored
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. llvm-svn: 182058
-
Richard Smith authored
#steps not #1s, and use a more traditional step count where the 'halt' step is not counted. llvm-svn: 182057
-
- May 16, 2013
-
-
Argyrios Kyrtzidis authored
This is a modified version of a patch by Manuel Klimek. llvm-svn: 182055
-
Richard Smith authored
llvm-svn: 182043
-
Fariborz Jahanian authored
synthesize a property getter method that overrides a method definition named 'retain' and the like. Fixes // rdar://13885083 llvm-svn: 182039
-
David Fang authored
llvm-svn: 182029
-
Daniel Jasper authored
This ensures that we format: void longFunctionName { } // long comment here And not: void longFunctionName {} // long comment here As requested in post-commit-review. llvm-svn: 182024
-
Daniel Jasper authored
llvm-svn: 182015
-
Daniel Jasper authored
llvm-svn: 182003
-
Daniel Jasper authored
llvm-svn: 182001
-