Skip to content

General issue [cpp] Bug when using Macro in query #15538

@dragoudin

Description

@dragoudin

Description of the issue

  • I have a cpp query very simple
import cpp

from Macro m
where
  ( 
  • I use vscode extension and I have an error

image
And error text is

Preprocessor::PreprocessorDirective.extends incompatible with @using \/ @stmt_constexpr_if \/ @stmt_range_based_for \/ @stmt_switch \/ @stmt_for \/ @stmt_end_test_while \/ @stmt_block \/ @stmt_while \/ @stmt_if \/ @isvolatile \/ @isvoid \/ @isunsigned \/ @issigned \/ @isscalar \/ @isrvaluereference \/ @isreference \/ @ispointer \/ @isobject \/ @ismemberpointer \/ @ismemberobjectpointer \/ @ismemberfunctionpointer \/ @islvaluereference \/ @isintegral \/ @isfundamental \/ @isfloatingpoint \/ @isconst \/ @iscompound \/ @iscompletetype \/ @isarithmetic \/ @arrayextent \/ @arrayrank \/ @isarray \/ @ispointerinterconvertiblebaseof \/ @islayoutcompatible \/ @isfunction \/ @issame \/ @blockassignexpr \/ @builtinshuffle \/ @builtinbitcast \/ @hasuniqueobjectrepresentations \/ @isaggregate \/ @isassignable \/ @temp_init \/ @co_yield \/ @co_await \/ @spaceshipexpr \/ @builtincomplex \/ @builtinconvertvector \/ @vec_fill \/ @builtinaddressof \/ @builtinchooseexpr \/ @builtinshufflevector \/ @noexceptexpr \/ @isfinalexpr \/ @isvalueclassexpr \/ @issimplevalueclassexpr \/ ...(227 other disjuncts) in context
  • When I run the command line, I have the following message
Compiling query plan for C:\XXXXXXXXXXXXXXXXXXXXXXXXXXXXX\export_macros.ql.
ERROR: Preprocessor::PreprocessorDirective.extends incompatible with @using \/ @stmt_constexpr_if \/ @stmt_range_based_for \/ @stmt_switch \/ @stmt_for \/ @stmt_end_test_while \/ @stmt_block \/ @stmt_while \/ @stmt_if \/ @isvolatile \/ @isvoid \/ @isunsigned \/ @issigned \/ @isscalar \/ @isrvaluereference \/ @isreference \/ @ispointer \/ @isobject \/ @ismemberpointer \/ @ismemberobjectpointer \/ @ismemberfunctionpointer \/ @islvaluereference \/ @isintegral \/ @isfundamental \/ @isfloatingpoint \/ @isconst \/ @iscompound \/ @iscompletetype \/ @isarithmetic \/ @arrayextent \/ @arrayrank \/ @isarray \/ @ispointerinterconvertiblebaseof \/ @islayoutcompatible \/ @isfunction \/ @issame \/ @blockassignexpr \/ @builtinshuffle \/ @builtinbitcast \/ @hasuniqueobjectrepresentations \/ @isaggregate \/ @isassignable \/ @temp_init \/ @co_yield \/ @co_await \/ @spaceshipexpr \/ @builtincomplex \/ @builtinconvertvector \/ @vec_fill \/ @builtinaddressof \/ @builtinchooseexpr \/ @builtinshufflevector \/ @noexceptexpr \/ @isfinalexpr \/ @isvalueclassexpr \/ @issimplevalueclassexpr \/ ...(219 other disjuncts) in context 
(C:\XXXXXXXXXXXXXXXXXXXXXXXXXXXXX\export_macros.ql:4,6-13)

I use latest version of codeql 2.16.1 (this query was working fine few months ago)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions