Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Mar 28, 2020. It is now read-only.
/swift-clangPublic archive

Mark indexstore enum flag types with flag_enum attribute#352

Conversation

@kastiglione
Copy link
Contributor

Duplicate of#288 targetingapple/stable/20190619


Adds useful compiler attributes to the two indexstore bit flag types:indexstore_symbol_property_t andindexstore_symbol_role_t.

Theseenum declarations are now declared with the following features:

  1. Defined as 64bit ints using C++ or ObjC sized enums, otherwise falling back to atypedef
  2. Marked withflag_enum attribute, if available
  3. Marked withenum_extensibility(open) attribute, if available

Additionally, the functions that return these types now return theenum itself or the fallbacktypedef. Previously these functions returned an explicituint64_t.

The motivation for these changes is for use from Swift. Now, these bit flags are imported into Swift asOptionSets.

@kastiglione
Copy link
ContributorAuthor

cc@benlangmuir

@benlangmuir
Copy link
Member

@swift-ci please test

@kastiglione
Copy link
ContributorAuthor

kastiglione commentedSep 5, 2019
edited
Loading

The build errors here and in#288 look unrelated:

clang-tools-extra/clangd/index/IndexAction.cpp:148:19: error: no member named 'createIndexingASTConsumer' in namespace 'clang::index'

However on linux there are compile warnings I should fix:

llvm/tools/clang/include/indexstore/indexstore.h:289:9: warning: 'flag_enum' attribute ignored [-Wignored-attributes]typedef INDEXSTORE_OPTIONS(uint64_t, indexstore_symbol_property_t) {        ^llvm/tools/clang/include/indexstore/indexstore.h:102:48: note: expanded from macro 'INDEXSTORE_OPTIONS'# define INDEXSTORE_OPTIONS(_type, _name) enum INDEXSTORE_OPTIONS_ATTRS _name : _type _name; enum INDEXSTORE_OPTIONS_ATTRS _name : _type                                               ^

@benlangmuir
Copy link
Member

@jkorous-apple do you recognize the error aboutcreateIndexingASTConsumer that@kastiglione mentioned?

@jkorous-apple
Copy link
Contributor

createIndexingASTConsumer is part of the refactoring that Dmitri landed upstream last week.

commit 8d32053f113348a4ea94f59b7553733aff0ba651
Author: Dmitri Gribenkogribozavr@gmail.com
Date: Thu Aug 29 11:43:05 2019 +0000

[Index] Stopped wrapping FrontendActions in libIndex and its usersExposed a new function, createIndexingASTConsumer, that creates anASTConsumer. ASTConsumers compose well.

@jkorous-apple
Copy link
Contributor

Is the target branch correct?

@kastiglione
Copy link
ContributorAuthor

If it was last week, maybe I should rebase?

@kastiglione
Copy link
ContributorAuthor

I've rebased both PRs.

@kastiglione
Copy link
ContributorAuthor

Should this be closed now?apple/stable/20190619 was last updated in July?

@benlangmuir
Copy link
Member

Should this be closed now? apple/stable/20190619 was last updated in July?

You're looking at the original (author) date of the commit, but it was only just recently cherry-picked to this branch. If you usegit log --format=fuller you can see when the cherry-pick happened:

AuthorDate: Thu Jul 11 22:59:28 2019
CommitDate: Thu Oct 3 14:01:33 2019

kastiglione reacted with thumbs up emoji

@benlangmuir
Copy link
Member

@swift-ci please test

1 similar comment
@benlangmuir
Copy link
Member

@swift-ci please test

@kastiglione
Copy link
ContributorAuthor

Thanks, I was actually looking at GitHub, but I'll know better now that it shows author date.

@benlangmuir
Copy link
Member

@swift-ci please test Linux

1 similar comment
@benlangmuir
Copy link
Member

@swift-ci please test Linux

@kastiglione
Copy link
ContributorAuthor

sweet things passed

@benlangmuirbenlangmuir merged commit89e5753 intoapple:apple/stable/20190619Oct 9, 2019
@kastiglionekastiglione deleted the indexstore-flag_enum2 branchOctober 10, 2019 20:42
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@kastiglione@benlangmuir@jkorous-apple

[8]ページ先頭

©2009-2025 Movatter.jp