-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[libc++] Use explicit #include instead of transitive #include #115420
Conversation
@llvm/pr-subscribers-libcxx Author: Peng Liu (winner245) ChangesThe benchmark test currently uses Full diff: https://github.com/llvm/llvm-project/pull/115420.diff 1 Files Affected:
diff --git a/libcxx/test/benchmarks/vector_operations.bench.cpp b/libcxx/test/benchmarks/vector_operations.bench.cpp
index b0dffe35ec6e14..119f9e16dadc6e 100644
--- a/libcxx/test/benchmarks/vector_operations.bench.cpp
+++ b/libcxx/test/benchmarks/vector_operations.bench.cpp
@@ -14,6 +14,7 @@
#include <deque>
#include <functional>
#include <vector>
+#include <memory>
#include "benchmark/benchmark.h"
|
@@ -14,6 +14,7 @@ | |||
#include <deque> | |||
#include <functional> | |||
#include <vector> | |||
#include <memory> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently this file also uses std::string
without explictly including <string>
. Perhaps we should add #include <string>
together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your reminder. I'll also add that.
#include <deque> | ||
#include <functional> | ||
#include <vector> | ||
#include <string> | ||
#include <memory> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#include <deque> | |
#include <functional> | |
#include <vector> | |
#include <string> | |
#include <memory> | |
#include <deque> | |
#include <functional> | |
#include <memory> | |
#include <string> | |
#include <vector> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I've adjusted the order of headers as per your suggestion.
This benchmark test currently uses
std::unique_ptr
without explicitly#include <memory>
. I think we should not rely on transitive inclusion.