Skip to content

Commit

Permalink
base: make base::Optional a shim for std::optional
Browse files Browse the repository at this point in the history
Now we can use C  17, forward base::optional to std::optional. In a
followup, we can cleanup the codebase to simply use std::optional
directly.

Change-Id: Idec58d95496b44bb609c8628d40747d81e2ab379
  • Loading branch information
LalitMaganti committed Mar 27, 2023
1 parent 62458da commit 03f5a97
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 3,101 deletions.
1 change: 0 additions & 1 deletion Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -8254,7 8254,6 @@ filegroup {
"src/base/logging_unittest.cc",
"src/base/metatrace_unittest.cc",
"src/base/no_destructor_unittest.cc",
"src/base/optional_unittest.cc",
"src/base/paged_memory_unittest.cc",
"src/base/periodic_task_unittest.cc",
"src/base/scoped_file_unittest.cc",
Expand Down
6 changes: 6 additions & 0 deletions gn/standalone/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 93,12 @@ config("extra_warnings") {
# Use after free detection in GCC is still not good enough: it still fails
# on very obvious false-positives in trace processor.
cflags_cc = [ "-Wno-use-after-free" ]

# GCC 7's handling of uninitialized std::optional is flaky at best and
# causes many false positives.
# TODO(lalitm): remove this when we upgrade to a GCC version which is good
# enough to handle this.
cflags_cc = [ "-Wno-maybe-uninitialized" ]
}
}

Expand Down
Loading

0 comments on commit 03f5a97

Please sign in to comment.