diff options
author | Daniel Jasper <djasper@google.com> | 2014-11-04 12:41:02 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2014-11-04 12:41:02 +0000 |
commit | d0ec0d62d67a89084bd299f5162446b89e6ef072 (patch) | |
tree | 4a1f9acc562cf9fc4e51648e590bdb83811ff629 /clang/lib/Format/TokenAnnotator.h | |
parent | c1f30877e0357a2513fdf4f99a90cfc35be6572e (diff) | |
download | bcm5719-llvm-d0ec0d62d67a89084bd299f5162446b89e6ef072.tar.gz bcm5719-llvm-d0ec0d62d67a89084bd299f5162446b89e6ef072.zip |
clang-format: Use identifier table for keywords in other languages.
Slightly easier to write, more efficient and prevents bugs by
misspelling them.
No functional changes intended.
llvm-svn: 221259
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.h')
-rw-r--r-- | clang/lib/Format/TokenAnnotator.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/Format/TokenAnnotator.h b/clang/lib/Format/TokenAnnotator.h index 88adc7503d3..fc4d1d66e72 100644 --- a/clang/lib/Format/TokenAnnotator.h +++ b/clang/lib/Format/TokenAnnotator.h @@ -108,8 +108,8 @@ private: /// \c UnwrappedLine. class TokenAnnotator { public: - TokenAnnotator(const FormatStyle &Style, IdentifierInfo &Ident_in) - : Style(Style), Ident_in(Ident_in) {} + TokenAnnotator(const FormatStyle &Style, const AdditionalKeywords &Keywords) + : Style(Style), Keywords(Keywords) {} /// \brief Adapts the indent levels of comment lines to the indent of the /// subsequent line. @@ -139,8 +139,7 @@ private: const FormatStyle &Style; - // Contextual keywords: - IdentifierInfo &Ident_in; + const AdditionalKeywords &Keywords; }; } // end namespace format |