Skip to content

Commit 12a4ec6

Browse files
committed
[clang][NFC] Convert Sema::FormatStringType to scoped enum
1 parent be82be2 commit 12a4ec6

File tree

4 files changed

+110
-99
lines changed

4 files changed

+110
-99
lines changed

clang/include/clang/Sema/Sema.h

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,20 @@ enum class TUFragmentKind {
496496
Private
497497
};
498498

499+
enum class FormatStringType {
500+
Scanf,
501+
Printf,
502+
NSString,
503+
Strftime,
504+
Strfmon,
505+
Kprintf,
506+
FreeBSDKPrintf,
507+
OSTrace,
508+
OSLog,
509+
Syslog,
510+
Unknown
511+
};
512+
499513
/// Sema - This implements semantic analysis and AST building for C.
500514
/// \nosubgrouping
501515
class Sema final : public SemaBase {
@@ -2251,19 +2265,6 @@ class Sema final : public SemaBase {
22512265
SourceLocation BuiltinLoc,
22522266
SourceLocation RParenLoc);
22532267

2254-
enum FormatStringType {
2255-
FST_Scanf,
2256-
FST_Printf,
2257-
FST_NSString,
2258-
FST_Strftime,
2259-
FST_Strfmon,
2260-
FST_Kprintf,
2261-
FST_FreeBSDKPrintf,
2262-
FST_OSTrace,
2263-
FST_OSLog,
2264-
FST_Syslog,
2265-
FST_Unknown
2266-
};
22672268
static StringRef GetFormatStringTypeName(FormatStringType FST);
22682269
static FormatStringType GetFormatStringType(StringRef FormatFlavor);
22692270
static FormatStringType GetFormatStringType(const FormatAttr *Format);

0 commit comments

Comments
 (0)