diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-07-27 04:46:02 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-07-27 04:46:02 +0000 |
commit | 96827eb52405a71c65c200949f3e644368e86454 (patch) | |
tree | 3e7254b9dc5eaa4bacd765500a57e4773daca8bb /include/clang/Analysis/Analyses/FormatString.h | |
parent | 5e04bdde8e74d991feffe9cf95d731f7e473dbb7 (diff) |
Revert r109428 "Hoist argument type checking into CheckFormatHandler. This is prep for scanf format"
Got errors about ASTContext being undefined with Visual Studio 2010.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109491 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Analysis/Analyses/FormatString.h')
-rw-r--r-- | include/clang/Analysis/Analyses/FormatString.h | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/include/clang/Analysis/Analyses/FormatString.h b/include/clang/Analysis/Analyses/FormatString.h index 812f5a7e47..3a5722a54a 100644 --- a/include/clang/Analysis/Analyses/FormatString.h +++ b/include/clang/Analysis/Analyses/FormatString.h @@ -305,8 +305,6 @@ protected: public: FormatSpecifier(bool isPrintf) : CS(isPrintf), UsesPositionalArg(false), argIndex(0) {} - - virtual ~FormatSpecifier(); void setLengthModifier(LengthModifier lm) { LM = lm; @@ -341,17 +339,6 @@ public: bool usesPositionalArg() const { return UsesPositionalArg; } bool hasValidLengthModifier() const; - - /// \brief Returns the type that a data argument - /// paired with this format specifier should have. This method - /// will an invalid ArgTypeResult if the format specifier does not have - /// a matching data argument or the matching argument matches - /// more than one type. - virtual ArgTypeResult getArgType(ASTContext &Ctx) const = 0; - - const ConversionSpecifier &getConversionSpecifier() const { - return CS; - } }; } // end analyze_format_string namespace @@ -451,9 +438,9 @@ public: return getConversionSpecifier().consumesDataArgument(); } - /// \brief Returns the type that a data argument + /// \brief Returns the builtin type that a data argument /// paired with this format specifier should have. This method - /// will an invalid ArgTypeResult if the format specifier does not have + /// will return null if the format specifier does not have /// a matching data argument or the matching argument matches /// more than one type. ArgTypeResult getArgType(ASTContext &Ctx) const; @@ -481,11 +468,6 @@ public: bool hasValidPrecision() const; bool hasValidFieldWidth() const; - - static bool classof(const analyze_format_string::FormatSpecifier *FS) { - return FS->getConversionSpecifier().isPrintfKind(); - } - }; } // end analyze_printf namespace @@ -510,7 +492,6 @@ public: } }; -using analyze_format_string::ArgTypeResult; using analyze_format_string::LengthModifier; using analyze_format_string::OptionalAmount; using analyze_format_string::OptionalFlag; @@ -542,13 +523,6 @@ public: bool consumesDataArgument() const { return CS.consumesDataArgument() && !SuppressAssignment; } - - /// \brief Returns the type that a data argument - /// paired with this format specifier should have. This method - /// will an invalid ArgTypeResult if the format specifier does not have - /// a matching data argument or the matching argument matches - /// more than one type. - ArgTypeResult getArgType(ASTContext &Ctx) const; static ScanfSpecifier Parse(const char *beg, const char *end); }; |