- Jun 19, 2010
-
-
Chris Lattner authored
-mconstructor-aliases by using a WeakVH instead of a raw pointer. llvm-svn: 106384
-
Fariborz Jahanian authored
(radar 8076356). llvm-svn: 106350
-
Jordy Rose authored
llvm-svn: 106339
-
Chris Lattner authored
to use them instead of SourceRange. CharSourceRange is just a SourceRange plus a bool that indicates whether the range has the end character resolved or whether the end location is the start of the end token. While most of the compiler wants to think of ranges that have ends that are the start of the end token, the printf diagnostic stuff wants to highlight ranges within tokens. This is transparent to the diagnostic stuff. To start taking advantage of the new capabilities, you can do something like this: Diag(..) << CharSourceRange::getCharRange(Begin,End) llvm-svn: 106338
-
Douglas Gregor authored
<rdar://problem/8108088>. llvm-svn: 106328
-
- Jun 18, 2010
-
-
Fariborz Jahanian authored
(radar 8076356) - wip. llvm-svn: 106322
-
Douglas Gregor authored
list is completely empty, from Lasse Kärkkäinen! Fixes PR7413. llvm-svn: 106320
-
Douglas Gregor authored
function to redeclarations of that function. Fixes PR7025. llvm-svn: 106317
-
Charles Davis authored
Also, test that static members with default visibility in a struct have the right mangling. llvm-svn: 106276
-
Tom Care authored
- Precision toStrings shouldn't print a dot when they have no value. - Length of char length modifier is now returned correctly. - Added several fixit tests. Note: fixit tests are currently broken due to a bug in HighlightRange. Marking as XFAIL for now. M test/Sema/format-strings-fixit.c M include/clang/Analysis/Analyses/PrintfFormatString.h M lib/Analysis/PrintfFormatString.cpp llvm-svn: 106275
-
Zhongxing Xu authored
llvm-svn: 106274
-
Ted Kremenek authored
Change two static variables into instance variables of ASTContext. This allows us to have multiple copies of ASTContext at the same time. llvm-svn: 106258
-
Douglas Gregor authored
attribute as part of the calculation. Sema::MarkDeclReferenced(), and a few other places, want only to consider the "used" bit to determine, e.g, whether to perform template instantiation. Fixes a linkage issue with Boost.Serialization. llvm-svn: 106252
-
Fariborz Jahanian authored
lvalue when performing a derived-to-base conversion. Fixes radar 7501812. Added an executable test to llvm-test suite. llvm-svn: 106247
-
Tom Care authored
M include/clang/Analysis/Analyses/PrintfFormatString.h M lib/Analysis/PrintfFormatString.cpp llvm-svn: 106245
-
- Jun 17, 2010
-
-
Fariborz Jahanian authored
Patch by Nico Weber (pr7390). llvm-svn: 106242
-
Fariborz Jahanian authored
an lvalue. Fixes PR7390. llvm-svn: 106235
-
Tom Care authored
- Added warning for undefined behavior when using field specifier - Added warning for undefined behavior when using length modifier - Fixed warnings for invalid flags - Added warning for ignored flags - Added fixits for the above warnings - Fixed accuracy of detecting several undefined behavior conditions - Receive normal warnings in addition to security warnings when using %n - Fix bug where '+' flag would remain on unsigned conversion suggestions Summary of changes: - Added expanded tests - Added/expanded warnings - Added position info to OptionalAmounts for fixits - Extracted optional flags to a wrapper class with position info for fixits - Added several methods to validate a FormatSpecifier by component, each checking for undefined behavior - Fixed conversion specifier checking to conform to C99 standard - Added hooks to detect the invalid states in CheckPrintfHandler::HandleFormatSpecifier Note: warnings involving the ' ' (space) flag are temporarily disabled until whitespace highlighting no longer triggers assertions. I will make a post about this on cfe-dev shortly. M test/Sema/format-strings.c M include/clang/Basic/DiagnosticSemaKinds.td M include/clang/Analysis/Analyses/PrintfFormatString.h M lib/Analysis/PrintfFormatString.cpp M lib/Sema/SemaChecking.cpp llvm-svn: 106233
-
Douglas Gregor authored
template specialization type, copy the location information but use the new type. Fixes PR7385. llvm-svn: 106224
-
Douglas Gregor authored
no overloaded operators were found in scope, mirroring what we already do for BinaryOperator. llvm-svn: 106222
-
Douglas Gregor authored
llvm-svn: 106220
-
Gabor Greif authored
llvm-svn: 106216
-
Argyrios Kyrtzidis authored
Make sure the caching mechanism in Parser::ParseLexedMethodDefs is robust against the parser reading too few tokens. llvm-svn: 106214
-
Argyrios Kyrtzidis authored
In a line like: (; the semicolon leaves Parser:ParenCount unbalanced (it's 1 even though we stopped looking for a right paren). This may affect later parsing and result in bad recovery for parsing errors. llvm-svn: 106213
-
Argyrios Kyrtzidis authored
llvm-svn: 106212
-
Charles Davis authored
llvm-svn: 106211
-
Ted Kremenek authored
Also refactor the diagnostics so that we print out the kind of stack memory returned. llvm-svn: 106210
-
Nate Begeman authored
1. builtins definitions for BuiltinsARM.def 2. intrinsic validation code for SemaChecking Unsure as to whether this is the best way to handle the make dependencies or not. llvm-svn: 106208
-
Nate Begeman authored
llvm-svn: 106206
-
Ted Kremenek authored
didn't indicate violated invariants but that we weren't recovering well. llvm-svn: 106195
-
Alexis Hunt authored
llvm-svn: 106188
-
Ted Kremenek authored
by inspecting the Store bindings instead of iterating over all the global variables in a translation unit. By looking at the store directly, we avoid cases where we cannot directly load from the global variable, such as an array (which can result in an assertion failure) and it also catches cases where we store stack addresses to non-scalar globals. Also, but not iterating over all the globals in the translation unit, we maintain cache locality, and the complexity of the checker becomes restricted to the complexity of the analyzed function, and doesn't scale with the size of the translation unit. This fixes PR 7383. llvm-svn: 106184
-
Ted Kremenek authored
the binding key instead of the region + offset. It isn't clear if this is the best semantics, but most clients will likely only care about simple bindings, or bindings to a particular variable. We can refine later if necessary. llvm-svn: 106183
-
Ted Kremenek authored
Correctly return early from BasicStoreManager::iterBindings() when the BindingsHandler returns false. llvm-svn: 106182
-
Douglas Gregor authored
"previous token" location at the end of the class definition. This eliminates a badly-placed error + Fix-It when the ';' following a class definition is missing. Fixes <rdar://problem/8066414>. llvm-svn: 106175
-
Alexis Hunt authored
Currently, there are two effective changes: - Attr::Kind has been changed to attr::Kind, in a separate namespace rather than the Attr class. This is because the enumerator needs to be visible to parse. - The class definitions for the C++0x attributes other than aligned are generated by TableGen. The specific classes generated by TableGen are controlled by an array in TableGen (see the accompanying commit to the LLVM repository). I will be expanding the amount of code generated as I develop the new attributes system while initially keeping it confined to these attributes. llvm-svn: 106172
-
Douglas Gregor authored
precise. Fixes PR7336. llvm-svn: 106170
-
Douglas Gregor authored
(or operator-function-id) as a template, but the context is actually non-dependent or the current instantiation, allow us to use knowledge of what kind of template it is, e.g., type template vs. function template, for further syntactic disambiguation. This allows us to parse properly in the presence of stray "template" keywords, which is necessary in C++0x and it's good recovery in C++98/03. llvm-svn: 106167
-
Douglas Gregor authored
disambiguation keywords outside of templates in C++98/03. Previously, the warning would fire when the associated nested-name-specifier was not dependent, but that was a misreading of the C++98/03 standard: now, we complain only when we're outside of any template. llvm-svn: 106161
-
- Jun 16, 2010
-
-
Ted Kremenek authored
llvm-svn: 106151
-