diff options
author | Joel Smith <joel.m.smith@gmail.com> | 2019-05-12 20:49:00 -0700 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2019-07-09 08:59:23 +0000 |
commit | 8c437362bc6e0374aa9b2dc9338aba1e5cf545a0 (patch) | |
tree | 450773172ae315bb3c7714e38de6a2367f21f081 /src/plugins/cpptools/cppcodeformatter.cpp | |
parent | 8a9c5a093d7a8869442c553a7fa40b8347b5f4af (diff) | |
download | qt-creator-8c437362bc6e0374aa9b2dc9338aba1e5cf545a0.tar.gz |
C++: Support single quote digit separator in integer literals
C++14 supports the use of single quotes inserted between integer digits
as a separator. Updates the built-in C++ code model to recognize such
quotes. This fixes highlighting and indentation issues.
Change-Id: Ic35ce93060b96700a11d108dce1f3cf6c4543632
Fixes: QTCREATORBUG-14939
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cppcodeformatter.cpp')
-rw-r--r-- | src/plugins/cpptools/cppcodeformatter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cppcodeformatter.cpp b/src/plugins/cpptools/cppcodeformatter.cpp index 069359d869..fca7998ece 100644 --- a/src/plugins/cpptools/cppcodeformatter.cpp +++ b/src/plugins/cpptools/cppcodeformatter.cpp @@ -1054,6 +1054,8 @@ int CodeFormatter::tokenizeBlock(const QTextBlock &block, bool *endedJoined) features.qtKeywordsEnabled = true; features.cxxEnabled = true; features.objCEnabled = true; + features.cxx11Enabled = true; + features.cxx14Enabled = true; SimpleLexer tokenize; tokenize.setLanguageFeatures(features); |