[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 12 11:43:50 PDT 2025


================
@@ -609,9 +632,10 @@ int GCCAsmStmt::getNamedOperand(StringRef SymbolicName) const {
 /// true, otherwise return false.
 unsigned GCCAsmStmt::AnalyzeAsmString(SmallVectorImpl<AsmStringPiece>&Pieces,
                                 const ASTContext &C, unsigned &DiagOffs) const {
-  StringRef Str = getAsmString()->getString();
-  const char *StrStart = Str.begin();
-  const char *StrEnd = Str.end();
+
+  std::string Str = getAsmString();
+  const char *StrStart = Str.data();
----------------
erichkeane wrote:

Curious why data/data+size instead of just begin/end?

https://github.com/llvm/llvm-project/pull/131003


More information about the cfe-commits mailing list