[all-commits] [llvm/llvm-project] c85fa7: [Attr] Fix `-ast-print` for `asm` attribute

Joel E. Denny via All-commits all-commits at lists.llvm.org
Mon Nov 18 08:56:19 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c85fa79d3663ecb3117e178b2a79ffa721d18e32
      https://github.com/llvm/llvm-project/commit/c85fa79d3663ecb3117e178b2a79ffa721d18e32
  Author: Joel E. Denny <jdenny.ornl at gmail.com>
  Date:   2019-11-18 (Mon, 18 Nov 2019)

  Changed paths:
    M clang/lib/Sema/SemaDecl.cpp
    M clang/test/AST/ast-print-attr.c

  Log Message:
  -----------
  [Attr] Fix `-ast-print` for `asm` attribute

Without this fix, the tests introduced here produce the following
assert fail:

```
clang: /home/jdenny/llvm/clang/include/clang/Basic/AttributeCommonInfo.h:163: unsigned int clang::AttributeCommonInfo::getAttributeSpellingListIndex() const: Assertion `(isAttributeSpellingListCalculated() || AttrName) && "Spelling cannot be found"' failed.
```

The bug was introduced by D67368, which caused `AsmLabelAttr`'s
spelling index to be set to `SpellingNotCalculated`.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D70349




More information about the All-commits mailing list