We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent acc2856 commit aae7003Copy full SHA for aae7003
1 file changed
cpp/common/src/codingstandards/cpp/Cpp14Literal.qll
@@ -5,13 +5,15 @@
5
*/
6
module Cpp14Literal {
7
private import cpp as StandardLibrary
8
+ private import codingstandards.cpp.UserDefinedLiteral
9
- /** A numeric literal. */
10
+ /** An numeric literal. */
11
abstract class NumericLiteral extends StandardLibrary::Literal {
12
NumericLiteral() {
13
// exclude user-defined literals as they define custom suffixes
14
not exists(StandardLibrary::FunctionCall fc |
- this = fc.getArgument(0) and fc.getTarget().getName().matches("operator \"\"%")
15
+ this = fc.getArgument(0) and
16
+ fc.getTarget() instanceof UserDefinedLiteral
17
) and
18
// exclude literals derived from template instantiations
19
not this.isFromTemplateInstantiation(_)
0 commit comments