Commit 582f0469 authored by Nick Desaulniers's avatar Nick Desaulniers Committed by Tobias Hieta
Browse files

[CGExprConstant] stop calling into ConstExprEmitter for Reference type destinations (#70366)

Fixes a bug introduced by
commit b54294e2 ("[clang][ConstantEmitter] have
tryEmitPrivate[ForVarInit] try ConstExprEmitter fast-path first")

In the added test case, the QualType is a LValueReferenceType.

    LValueReferenceType 0x558412998d90 'const char (&)[41]'
    `-ParenType 0x558412998d30 'const char[41]' sugar
      `-ConstantArrayType 0x558412998cf0 'const char[41]' 41
        `-QualType 0x55841294c271 'const char' const
          `-BuiltinType 0x55841294c270 'char'

Fixes: #69979
(cherry picked from commit d9b15b06)
parent 309d5514
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment