We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 67cd6b7 + a9811fe commit 4497aa5Copy full SHA for 4497aa5
cpp/ql/lib/semmle/code/cpp/Macro.qll
@@ -34,7 +34,7 @@ class Macro extends PreprocessorDirective, @ppd_define {
34
* Gets the name of the macro. For example, `MAX` in
35
* `#define MAX(x,y) (((x)>(y))?(x):(y))`.
36
*/
37
- string getName() { result = this.getHead().splitAt("(", 0) }
+ string getName() { result = this.getHead().regexpCapture("([^(]*+).*", 1) }
38
39
/** Holds if the macro has name `name`. */
40
predicate hasName(string name) { this.getName() = name }
0 commit comments