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.
1 parent 6867e94 commit a9811feCopy full SHA for a9811fe
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