- Oct 27, 2012
-
-
Rafael Espindola authored
llvm-svn: 166878
-
Rafael Espindola authored
llvm-svn: 166876
-
Rafael Espindola authored
to reduce. llvm-svn: 166863
-
Rafael Espindola authored
jump over destructor calls. Fixes pr13812. llvm-svn: 166855
-
- Sep 25, 2012
-
-
John McCall authored
into the enclosing scope; this is a more accurate model but is (I believe) unnecessary in my test case due to other flaws. However, one of those flaws is now intentional: blocks which appear in return statements can be trivially observed to not extend in lifetime past the return, and so we can allow a jump past them. Do the necessary magic in IR-generation to make this work. llvm-svn: 164589
-
- Mar 11, 2012
-
-
David Blaikie authored
The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
-
- Feb 22, 2012
-
-
Bill Wendling authored
llvm-svn: 151151
-
- Oct 20, 2011
-
-
Richard Smith authored
but trivially constructible and destructible variables in C++11 mode. Also incidentally improve the precision of the wording for jump diagnostics in C++98 mode. llvm-svn: 142619
-
- Sep 18, 2011
-
-
Francois Pichet authored
Move the "jump bypasses variable initialization" error -> warning downgrade from -fms-extensions to -fms-compatibility. llvm-svn: 140008
-
- Sep 17, 2011
-
-
Francois Pichet authored
Rename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag. Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag. llvm-svn: 139987
-
Francois Pichet authored
Also add a test case for the non Microsoft case because such test didn't exist. llvm-svn: 139971
-
- Sep 13, 2011
-
-
Francois Pichet authored
In Microsoft mode, downgrade "goto into protected scope" from error to warning if we are jumping over a variable initialization via a goto. This fixes a few errors when parsing MFC code with clang. llvm-svn: 139595
-
- Sep 09, 2011
-
-
Francois Pichet authored
llvm-svn: 139364
-
- Jul 23, 2011
-
-
Chris Lattner authored
them into the clang namespace. llvm-svn: 135852
-
- Jul 11, 2011
-
-
Fariborz Jahanian authored
require destruction and there is possibility of that without construction. Thanks Johnm for review and suggestions offline. // rdar://9535237. llvm-svn: 134906
-
- Jun 24, 2011
-
-
Argyrios Kyrtzidis authored
Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about 'ownership', not 'lifetime'. rdar://9477613. llvm-svn: 133779
-
- Jun 16, 2011
-
-
John McCall authored
Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. llvm-svn: 133103
-
- Jun 15, 2011
-
-
Douglas Gregor authored
protected in the case where a variable is being initialized by a trivial default constructor but has a non-trivial destructor. llvm-svn: 133037
-
- May 28, 2011
-
-
Douglas Gregor authored
llvm-svn: 132229
-
- May 27, 2011
-
-
Douglas Gregor authored
class type (or array thereof), eliminating some redundant checks (thanks Eli!) and adding some tests where the behavior differs in C++98/03 vs. C++0x. llvm-svn: 132218
-
Douglas Gregor authored
so that it looks at the initializer of a local variable of class type (or array thereof) to determine whether it's just an implicit invocation of the trivial default constructor. Fixes PR10034. llvm-svn: 132191
-
- Apr 15, 2011
-
-
Richard Smith authored
llvm-svn: 129567
-
- Feb 17, 2011
-
-
Chris Lattner authored
LabelDecl and LabelStmt. There is a 1-1 correspondence between the two, but this simplifies a bunch of code by itself. This is because labels are the only place where we previously had references to random other statements, causing grief for AST serialization and other stuff. This does cause one regression (attr(unused) doesn't silence unused label warnings) which I'll address next. This does fix some minor bugs: 1. "The only valid attribute " diagnostic was capitalized. 2. Various diagnostics printed as ''labelname'' instead of 'labelname' 3. This reduces duplication of label checking between functions and blocks. Review appreciated, particularly for the cindex and template bits. llvm-svn: 125733
-
- Feb 13, 2011
-
-
John McCall authored
Stmt::const_child_range, then make a bunch of places use them instead of the individual iterator accessors. llvm-svn: 125450
-
- Oct 28, 2010
-
-
John McCall authored
in the scope checker. With that done, turn an indirect goto into a protected scope into a hard error; otherwise IR generation has to start worrying about declarations not dominating their scopes, as exemplified in PR8473. If this really affects anyone, I can probably adjust this to only hard-error on possible indirect gotos into VLA scopes rather than arbitrary scopes. But we'll see how people cope with the aggressive change on the marginal feature. llvm-svn: 117539
-
- Aug 26, 2010
-
-
John McCall authored
Clients of Sema don't need to know (for example) the list of diagnostics we support. llvm-svn: 112093
-
- Aug 25, 2010
-
-
John McCall authored
llvm-svn: 112032
-
- Aug 12, 2010
-
-
Douglas Gregor authored
llvm-svn: 110945
-
- Aug 03, 2010
-
-
John McCall authored
purposes of the jump checker. Also extend Ted's iteration fix to labels. Fixes PR7789. llvm-svn: 110082
-
Ted Kremenek authored
Fix another case (this time in JumpScopeChecker) where walking deeply nested CaseStmts can blow out the stack. Fixes <rdar://problem/8125165>. llvm-svn: 110071
-
- Jul 01, 2010
-
-
Douglas Gregor authored
rdar://problem/8124080 and PR7118. llvm-svn: 107358
-
- Jun 22, 2010
-
-
Douglas Gregor authored
if/while/switch/for statements to ensure that walking the children of these statements actually works. Previously, we stored the condition variable as a VarDecl. However, StmtIterator isn't able to walk from a VarDecl to a set of statements, and would (in some circumstances) walk beyond the end of the list of statements, cause Bad Behavior. In this change, we've gone back to representing the condition variables as DeclStmts. While not as memory-efficient as VarDecls, it greatly simplifies iteration over the children. Fixes the remainder of <rdar://problem/8104754>. llvm-svn: 106504
-
- May 12, 2010
-
-
John McCall authored
a convenience routine to find the innermost common ancestor of two scopes. llvm-svn: 103565
-
John McCall authored
about the permitted scopes. Specifically: 1) Permit labels and gotos to appear after a prologue of variable initializations. 2) Permit indirect gotos to jump out of scopes that don't require cleanup. 3) Diagnose possible attempts to indirect-jump out of scopes that do require cleanup. This requires a substantial reinvention of the algorithm for checking indirect goto. The current algorithm is Omega(M*N), with M = the number of unique scopes being jumped from and N = the number of unique scopes being jumped to, with an additional factor that is probably (worst-case) linear in the depth of scopes. Thus the entire thing is likely cubic given some truly bizarre ill-formed code; on well-formed code the additional factor collapses to an amortized constant (when amortized over the entire function) and so the algorithm is quadratic. Even this requires every label to appear in its own scope, which would be very unusual for indirect-goto code (and extremely unlikely for well-formed code); it is far more likely that all labels will be in the same scope and so the algorithm becomes linear. For such a marginal feature, I am fairly happy with this result. (this is using JumpDiagnostic's definition of scope, where successive variables in a block appear in their own scope) llvm-svn: 103536
-
- Apr 24, 2010
-
-
Douglas Gregor authored
statements. Instead of the @try having a single @catch, where all of the @catch's were chained (using an O(n^2) algorithm nonetheless), @try just holds an array of its @catch blocks. The resulting AST is slightly more compact (not important) and better represents the actual language semantics (good). llvm-svn: 102221
-
- Mar 08, 2010
-
-
Douglas Gregor authored
Make a note for the C++0x future, when we'll have to revisit the jump-diagnostics handling for variables without initializers llvm-svn: 97929
-
- Mar 01, 2010
-
-
Chris Lattner authored
a fixme and PR6451. Only perform jump checking if the containing function has no errors, and add the infrastructure needed to do this. On the testcase in the PR, we produce: t.cc:6:3: error: illegal goto into protected scope goto later; ^ t.cc:7:5: note: jump bypasses variable initialization X x; ^ llvm-svn: 97497
-
- Nov 17, 2009
-
-
Douglas Gregor authored
llvm-svn: 89051
-
- Sep 09, 2009
-
-
Mike Stump authored
llvm-svn: 81346
-
- Jul 19, 2009
-
-
Chris Lattner authored
llvm-svn: 76376
-